Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to convert timestamp with timezone to date format?

RinneJul 21 2009 — edited Jul 21 2009
I got a column called timeentered from table table_test which is stored in date format (Australia time). I need to convert it to UTC timezone first, then change it to a date format. I got the below query to convert the timezone, but how can I then convert it to a date format?

select from_tz(to_timestamp(to_char(timeentered,'YYYYMMDDHH24MISS'),'YYYYMMDDHH24MISS'),'Australia/Sydney') at time zone 'UTC'
from table_test
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 18 2009
Added on Jul 21 2009
5 comments
12,957 views