Forum Discussion
Keshavpooja
5 years agoFrequent Visitor
Convert column from Datetimezone to Datetime - M Query
Hi Experts, I am getting values from the source like '2021-02-10 20:48:24 +01:00' which has been assigned type 'DateTimeZone' in the Query Editor. I would like to store it as 'DateTime' format wi...
- 4 years ago
Please try this expression.
= DateTimeZone.RemoveZone([DTZ]) + #duration(0, DateTimeZone.ZoneHours([DTZ]),0,0)
Pat
Fowmy
Super User
4 years agoKeshavpooja
You can add zero as the parameter SwitchZone:
DateTimeZone.RemoveZone( DateTimeZone.SwitchZone([DateTime], 0))
- Keshavpooja4 years agoFrequent Visitor
Hi Fowmy
If I add 0 as parameter as you suggested, it becomes '2021-02-10 19:48:24'.
Something seems to be wrong here. It behaves wierd.