ALTER SESSION
SET NLS_DATE_FORMAT = 'DD-MM-YYYY';
SELECT
DEADLINE_DATE
,TO_CHAR(DEADLINE_DATE, 'mm/dd/yyyy hh24:mi:ss')
FROM
SCHEMA.TABLE
ORDER BY
DEADLINE_DATE asc
I'm hunting out invalid date values in my source, and running the above query finds me the following 4 records which all have out-of-range YYYY values.
Why though, do these 4 different DEADLINE_DATE values, when TO_CHAR is applied, convert to the same 00/00/0000 00:00:00 output, instead of e.g. '20/12/5048 00:00:0000', '24/10/5045 00:00:00', etc.?