Skip to Main Content

SQL & PL/SQL

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!

alter session set nls_date_format does not work

ANNECJul 20 2018 — edited Jul 21 2018

We are using Oracle 12c.

I used the following in Oracle SQL developer.

alter session set nls_date_format = 'mm/dd/yy hh24:mi:ss';

select  WHENCREATED from mytable;

It did not change the format of the date, it is still like the 07-NOV-15 08.00.20.000000000 AM. The server default one.

I also tried on SQLPLUS, same thing.

I know there is a way to set in preference the date format, but just wonder why the alter session set nls_date_format does not work for my existing date column format in this session?

If I just query

select sysdate from dual; that works.

Thanks,

This post has been answered by Frank Kulash on Jul 20 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 18 2018
Added on Jul 20 2018
4 comments
4,862 views