How to make sure NLS_DATE_FORMAT is correct and set to "YYYY-MM-DD HH24:MI:SS"?
select
1 as id,
parameter,
value
from
nls_database_parameters
where
parameter = 'NLS_DATE_FORMAT'
union
select
2 as id,
parameter,
value
from
nls_instance_parameters
where
parameter = 'NLS_DATE_FORMAT'
alter system
set
nls_date_format = "yyyy-mm-dd hh24:mi:ss" scope = spfile
Also check the issue caused by setting this wrong: Clarity with Oracle throws ORA-01861: literal does not match format string