Forum Discussion
h4tt3n
6 years agoHelper V
Convert a columns of datatype datetimezone to datetime
Hello, I have a table with timestamped data of datatype datetimezone, eg. 07-08-2020 08:00:00 + 02:00. How do I convert this to datetime in a way that takes tz info into account, eg. 07-08-2020...
h4tt3n
6 years agoHelper V
orry, this simply discards timezone info, it doesn't incorporate it into the time. However, I have found the solution with a python script.
artemus
6 years agoMicrosoft Employee
In effect you are asking to convert a datetimezone value to a datetime in UTC:
let
dtz = ...,
udtz = DateTimeZone.SwitchZone(dtz, 0),
dt = DateTimeZone.RemoveZone(udtz)
in
dt