How can I change the defult date format in oracle10g enterprise?

Question: I use alter session & NLS_DATE_FORMAT, but it's not working.


The ALTER SESSION command in Oracle only affects the current session (as the name implies). This means that anybody else connected to the database won't be affected and neither will any future sessions - so if you log off and log on again, the NLS_DATE_FORMAT reverts to the default (the value set by database initialisation parameters).

Therefore to change the date format for all future sessions you will need to change the NLS_DATE_FORMAT parameter in the Oracle database initialisation file.

Oracle documentation covers globalization settings quite comprehensively in the Oracle Database Globalization Support Guide but settings can be changed after installation (as noted above) by changing the values of parameters and restarting the database.

Click here to post comments

Join in and write your own page! It's easy to do. How? Simply click here to return to Oracle Questions.