How to make sure NLS_DATE_FORMAT is correct and set to "YYYY-MM-DD HH24:MI:SS"?
select    1 as id,    parameter,    valuefrom    nls_database_parameterswhere    parameter = 'NLS_DATE_FORMAT'unionselect    2 as id,    parameter,    valuefrom    nls_instance_parameterswhere    parameter = 'NLS_DATE_FORMAT'alter systemset    nls_date_format = "yyyy-mm-dd hh24:mi:ss" scope = spfileAlso check the issue caused by setting this wrong: Clarity with Oracle throws ORA-01861: literal does not match format string