Forum Discussion
h4tt3n
Helper V
6 years agoConvert 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...
AGo
Post Patron
2 years agoFirst convert column to Date/Time/Zone and then here's my solution in PowerQuery:
Table.TransformColumns(#"PREVIOUS STEP NAME",{{"FIELD NAME", each if _=null then null else DateTime.From(_)+#duration(0,Number.From(Text.Start(Text.End(Text.From(_),6),3)),0,0), type datetime}})