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!

Date as DD-Mon-YYYY format

999670Jun 17 2016 — edited Jun 17 2016

Hi All,

Some simple date display , but it is not working as expected.

SQL> select * from v$version;


Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

SQL> select sysdate from dual;

16-06-17

I want to display date as , DD-Mon-YYYY , i.e 17-Jun-2016

So i tried with alter session as below :

SQL> alter session set nls_date_format='DD-Mon-YYYY' ;

Session altered.

SQL> select sysdate from dual;

SYSDATE

----------------

17-6  -2016

it is not displaying as 17-Jun-2016

i checked my nls params as SYS:

SQL> show parameter nls

NAME                                 TYPE                   VALUE

------------------------------------ ---------------------- ------------------------------

nls_calendar                         string

nls_comp                             string                 BINARY

nls_currency                         string

nls_date_format                      string

nls_date_language                    string

nls_dual_currency                    string

nls_iso_currency                     string

nls_language                         string                 AMERICAN

nls_length_semantics                 string                 BYTE

nls_nchar_conv_excp                  string                 FALSE

nls_numeric_characters               string

NAME                                 TYPE                   VALUE

------------------------------------ ---------------------- ------------------------------

nls_sort                             string

nls_territory                        string                 AMERICA

nls_time_format                      string

nls_time_tz_format                   string

nls_timestamp_format                 string

nls_timestamp_tz_format              string

This post has been answered by Frank Kulash on Jun 17 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 15 2016
Added on Jun 17 2016
6 comments
13,908 views