I am facing a very strange issue in Oracle 19c database while converting date to timestamp with timezone. In the below first query works , the second does not , not sure why ??
Any pointers will be greately appreciated :
First query:
SELECT
CAST(TO_DATE('08-MAR-2024 02:30:02 AM','DD-MON-YYYY HH:MI:SS AM') AS TIMESTAMP WITH TIME ZONE)
FROM dual;
this one works.
Second query
SELECT
CAST(TO_DATE('10-MAR-2024 02:30:02 AM','DD-MON-YYYY HH:MI:SS AM') AS TIMESTAMP WITH TIME ZONE)
FROM
dual;
this one fails with error :
ORA-01878: specified field not found in datetime or interval
01878. 00000 - "specified field not found in datetime or interval"
*Cause: The specified field was not found in the datetime or interval.
*Action: Make sure that the specified field is in the datetime or interval.