Convert the datetime value of one time zone to another time zone in Vertica
timezone, vertica
Solution
I was able to convert. Sample queries given below:
SELECT TIMESTAMP WITH TIME ZONE '2012-07-02 10:00:00-04' AT TIME ZONE 'GMT';
timezone
---------------------
2012-07-02 14:00:00
(1 row)
SELECT TIMESTAMP WITH TIME ZONE '2012-07-02 14:00:00-00' AT TIME ZONE 'EDT';
timezone
---------------------
2012-07-02 10:00:00
(1 row)
Problem
Is there anything in Vertica to get the same output as given by the following Sql query in Oracle? ``` SELECT FROM_TZ(CAST(TO_DATE('1999-12-01 11:00:00', 'YYYY-MM-DD HH:MI:SS') AS TIMESTAMP), 'America/New_York') AT TIME ZONE 'America/Los_Angeles' "West Coast Time" FROM DUAL; West Coast Time ------------------------------------------------ 01-DEC-99 08.00.00.000000 AM AMERICA/LOS_ANGELES ```