My present date format is, to be changed into English needs to enter the command:
ALTER session SET Nls_date_language=american;
Changed to:
If you want to change English to Chinese, you can use the command: Alter session set nls_date_language= ' Simplified Chinese '; try it.
The results are as follows:
Note: The command to view the current date is in English and Chinese: Select Sys_context (' USERENV ', ' language ') from dual;
Although these commands can change the date output format, but should be for the current session only, when you open another session, see the date format, or did not change. To change the Oracle default date output format:
(1) Linux system: Change under Oracle User's. Bash_profie in which add like Export nls_date_format= ' yyyy-mm-dd hh24:mi:ss ' or export nsl_date_format= YYYYMMDD;
Make it effective immediately available source. bash_profile
(2) under Windows System:
① Modify the registry, add a string to the registry/HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/HOME0 primary key, string named Nls_date_format, and the value of the string is the time format you want to define, such as: YYYY-MM-DD Hh24:mi:ss
After the change, re-opened a session
② Modify the Oracle parameter file Initsid.ora. Can be added directly in the parameter file:
Nls_date_format=yyyy-mm-dd-hh24:mi:ss, but the Nls_lang string value of the above position in the registry must be removed.
Initsid.ora generally under the/oracle/oracle/database, remember the SID in Initsid.ora for your Oracle SID, do not find the name Initsid.ora, my is Initorcl.ora.
Another two articles on modifying date formats: http://blog.csdn.net/gudufeiyang/article/details/5938885 http:// www.itpub.net/thread-28822-1-1.html