Forum Discussion
DateTimeZone not recognized when using DateTimeZone.SwitchZone(DateTime.LocalNow(),3,0)
- 6 years ago
Hi sandra_p ,
You may select on the new created datetime column, go to Transform tab, choose Data Type and select Date/Time/TimeZone instead of Date/Time, don't forget to click button "Close & Apply".
For reference:
https://community.powerbi.com/t5/Desktop/Convert-UTC-to-client-time-zones/td-p/56337
https://community.powerbi.com/t5/Desktop/Convert-UTC-to-local-time-zone-in-DAX/td-p/43328
https://radacad.com/solving-dax-time-zone-issue-in-power-bi
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
sandra_p , can share the sample data . If can you are UK data format, make sure setting is correct
Hello,
Thank you for answer.
Everything is ok with format. I need to see the time 3 hours ahead in Power BI Service.
On my computer time is correct, because I have my local time zone on it.
Once report is published - time is 3 hours back once report is refreshed.
This function https://docs.microsoft.com/en-us/powerquery-m/datetimezone-switchzone - is supposed to switch timezone - that is what I need. But once I use it - it throws error (mentioned in my post) even though - the field I pass in it (see my code) is DateTimeZone type.
- v-xicai6 years agoCommunity Support
Hi sandra_p ,
You may select on the new created datetime column, go to Transform tab, choose Data Type and select Date/Time/TimeZone instead of Date/Time, don't forget to click button "Close & Apply".
For reference:
https://community.powerbi.com/t5/Desktop/Convert-UTC-to-client-time-zones/td-p/56337
https://community.powerbi.com/t5/Desktop/Convert-UTC-to-local-time-zone-in-DAX/td-p/43328
https://radacad.com/solving-dax-time-zone-issue-in-power-bi
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.