Skip to Main Content

Live 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!

Cannot set NLS_DATE_FORMAT in LiveSQL V2 !

user7111641Jul 5 2025

Hello All,

In database LiveSQL V2 it is currently not possible to use ALTER SESSION to change NLS_DATE_FORMAT
in a script.

The ALTER SESSION statement runs without error, in NLS_SESSION_PARAMETERS we see the correct format set,
but, when running a SQL statement, we see a different format:

alter session set nls_date_format = 'YYYY-MM-DD'
/

Session altered.

select * from nls_session_parameters
where parameter = 'NLS_DATE_FORMAT'
/

PARAMETER                 VALUE                          
------------------------- ------------------------------                 
NLS_DATE_FORMAT           YYYY-MM-DD        

select sysdate, trunc(sysdate)
from dual
/

SYSDATE                   TRUNC(SYSDATE)            
------------------------- ------------------------- 
07/05/2025, 07:16:37 PM   07/05/2025, 03:00:00 AM  

1 rows selected.

Also, for some reason, the default time for a truncated DATE appears as 03:00:00 AM instead of 00:00:00.

Thanks a lot in advance for looking into this problem.

Best Regards,
Iudith Mentzel

Comments
Post Details
Added on Jul 5 2025
0 comments
32 views