Convert timestamp to UTC
871170Jun 24 2011 — edited Jun 24 2011I am storing date&time in one column and Timezone in one column. So I need to convert this to UTC format.
Note: I will be having different timezones in timezone column.
We have a function to convert the timestamp to UTC format . i.e. SYS_EXTRACT_UTC
Example is:
SELECT SYSTIMESTAMP, SYS_EXTRACT_UTC (SYSTIMESTAMP) FROM DUAL
SELECT SYS_EXTRACT_UTC(TIMESTAMP '2005-05-13 19:15:26 PST') FROM dual
when I execute the below query it is giving error like : TIMEZone region is not found
SELECT SYS_EXTRACT_UTC(TIMESTAMP '2005-05-13 19:15:26 IST') FROM dual
And I used the NEW_TIME also like the below
select new_time(t.start_date, 'PDT', 'GMT') from test t -- This is working fine.
select new_time(t.start_date, 'IST', 'GMT') from test t -- This is not working. because NEW_TIME supporting limited timezones.
Can any body help me out to convert all timezones Timestamps to UTC/GMT.
Can anybody suggest me is there any oracle function to support all timezones and convert the timestamps to UTC/GMT?
Please mail me to sivakumari17@gmail.com