Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the default date format in SQLPlus

Status
Not open for further replies.

ThessDJ

Programmer
May 11, 2009
2
0
0
CA
I am currently attending an Oracle SQL class and the teacher mentioned that the default date format for sqlplus is DD-MMM-RR and in school, when i run a select statement, it does display the date in that format.

Then, I tried to install oracle 10g in my laptop (with Windows Vista OS) but when i do a select, the date format is in YY-MM-DD. How do i change the default date format? Where does it get that format setting from, Windows or Oracle?

Thanks,

 
Hi,
Windows Registry has the Oracle configuration entries - HKLM_Software..Oracle ( look under the Oracle Home section
for an entry called NLS_DATE_FORMAT. )
If no such entry exists and NO entry starting NLS_ is there, then the database instance you are connectiong to has that date format set in the init<sid>.ora file.
If you have ANY NLS_ entries,but not NLS_DATE_FORMAT, add one setting the format to "MM-DD-YYYY" ( my favorite, at least)

careful when editing the registry -




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top