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