Skip to Main Content

SQL Developer for VS Code

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!

NLS session parameters

Settings of NLS_DATE_FORMAT parameters for the session are not taken into account in query results (QUERY RESULT). However, they work correctly in script results (SCRIPT OUTPUT) or in SQLcl.

select sysdate from dual;

QUERY RESULT :

(interesting fact: if I copy this date (right click I got '2024-02-18T17:37:36' )

SCRIPT RESULT

SYSDATE

--------

18/02/24


alter session set nls_date_format = 'yyyy-mm-dd hh24:mi:ss';

select sysdate from dual;

QUERY RESULT

When I copy it (right click ) => ‘2024-02-18T17:39:59’

SCRIPT RESULT

SYSDATE

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

2024-02-18 17:40:41


In SQL Developer and sqlcl - it works correctly.

SQL> select sysdate from dual;

SYSDATE
___________
24/02/18

SQL> alter session set nls_date_format = 'yyyy-mm-dd hh24:mi:ss';

Session altered.

SQL> select sysdate from dual;

SYSDATE
______________________
2024-02-18 17:25:55

SQL>

This post has been answered by thatJeffSmith-Oracle on Feb 20 2024
Jump to Answer
Comments
Post Details
Added on Feb 18 2024
1 comment
373 views