Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Changing the Default date format to YYYY-MM-DD in oracle 12c

2842971Feb 9 2016 — edited Mar 2 2016

Hi

Need help in changing the default date format of the instance to YYYY-MM-DD. We are migrating from DB2 to oracle 12c . The DB2 has the date format yyyy-mm-dd and the developers dont want to change their code to minimize their work.  So I have changed the nls_date_format

as alter system set nls_date_format='YYYY-MM-DD hh24:Mi :SS' scope=spfile and bounced the DB. Later I checked select sysdate from dual  the date format is not changed it still shows dd-mon-yy.  What is the procedure to change the default date format nls_Date_format in oracle 12c

SQL> show parameter nls_date

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
nls_date_format                      string      DD-MON-RR
nls_date_language                    string      AMERICAN
SQL> select sysdate from dual;

SYSDATE
---------
09-FEB-16


Thanks in advance

Sri

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 30 2016
Added on Feb 9 2016
29 comments
25,316 views