-1

I have 2 columns in a table as follows,

TIMESTAMP                          TIMEZONE
2020-08-20T02:36:52.000+0000       PST
2020-08-20T02:36:52.000+0000       GMT
2020-08-20T02:36:52.000+0000       CST

Now I want to convert those timestamp column data to UTC column.. But the conversion should be based on the timestamp and the timezone column. I can do it on a dataframe. But I have to do it on SQL.

Please help on how to use both the columns to derive respective UTC Timestamp data for each record.

user4157124
  • 2,809
  • 13
  • 27
  • 42
Lokesh
  • 87
  • 2
  • 11

1 Answers1

1

Got the answer for this,

SELECT to_utc_timestamp(timestamp, timezone) from tablename;

This will sort the issue..

Lokesh
  • 87
  • 2
  • 11