Oracle date functions problem
When I use Oracle date functions Format, the date format is - DD-MM-YYYY, on other machines, when I use the same function, I get this date format MM-DD-YY, this is really confusing how can I change it so both machines use the same date format?
Computers & Internet - Oracle - 10g Database Standard (ODBSEONUPP0)
Answers & Comments
As an Oracle Developer I do not rely on default date format. You can see the default as:
SVRMGR> select * from v$NLS_PARAMETERS; PARAMETER VALUE ----------------------------------------- ------------------ NLS_LANGUAGE AMERICAN NLS_TERRITORY AMERICA NLS_CURRENCY $ NLS_ISO_CURRENCY AMERICA NLS_NUMERIC_CHARACTERS ., NLS_CALENDAR GREGORIAN NLS_DATE_FORMAT DD-MON-YY NLS_DATE_LANGUAGE AMERICAN NLS_CHARACTERSET US7ASCII NLS_SORT BINARY NLS_NCHAR_CHARACTERSET US7ASCII Hence you can set, and use a default date format, in this case DD-MON-YY.However as a developer I use the TO_DATE function when wanting to set a date.eg vd_mydate := TO_DATE('25-07-2008','dd-mm-yyyy');Or the TO_CHAR function when displaying a date in the way I want to see it.eg. SELECT TO_CHAR(my_date_col,'"The "ddspth" of "Month, yyyy') FROM dual;