How to convert timestamp with timezone to date format?
RinneJul 21 2009 — edited Jul 21 2009I 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