Postgres query:
SELECT extract(EPOCH FROM TIMESTAMP '2022-05-08T16:49:34Z') from table_name;
I need to convert the above Postgres query to an Oracle query.
I am new to Oracle and what I could come up with is,
SELECT (TO_TIMESTAMP('2022-05-08T16:49:34Z', 'yyyy-MM-dd"T"HH:mm:ssXXX')*24*3600) FROM DUAL;
but I am getting error,
ORA-00932: inconsistent datatypes: expected NUMBER got TIMESTAMP
In Oracle, is there any reliable method to extract the EPOCH from the given DateTime(varchar)?