I am new to Synapse Data Warehouse.
Currently, I have a timestamp column named last_update_utc as string data type and it is UTC time. I need to add a new column last_update_est with timestamp as datetime2 data type convert from last_update_utc column - The conversion also needs to account for DST. You can check the sample output below:
id | last_update_utc (string) | last_update_est (datetime2)
1 | 2020-02-28T17:26:47.483698Z | 2020-02-28T12:26:47.483698Z
2 | 2021-09-03T22:59:19.093Z | 2021-09-03T18:59:19.093Z
The first row, It is 5 hours of difference without DST and it is 4 hours of difference with DST. The table name is hub.test
and initially, there are id and last_update_utc columns.
Is there a simple function or method to achieve the above task in Synapse DW ?
Thanks