Forum Discussion
Anonymous
5 years agoNot applicable
Changing time From UTC to Local Time
Hello all, I tried multiple functions to change the time from UTC to my local time, but its not working as you can see above in colomnm [EVENT_TIME_UTC], I have the time in UTC and my lo...
- 5 years ago
HI Anonymous
Download this sample PBIX file with the following data and measure
Create a Calculated Column using this
EVENT_TIME_LOCAL = 'Table'[EVENT_TIME_UTC] + TIME(3,0,0)Giving this result
Regards
Phil
themistoklis
5 years agoCommunity Champion
Hello Anonymous
Are you trying to do the datetime transformation using Power Query or DAX?
Have you tried using the DateTime.AddZone and DateTimeZone.SwitchZone functions in Power Query?
https://docs.microsoft.com/en-us/powerquery-m/datetime-addzone
https://docs.microsoft.com/en-us/powerquery-m/datetimezone-switchzone
https://www.poweredsolutions.co/2019/10/21/handling-different-time-zones-in-power-bi-power-query/
Example in Power Query:
DateTimeZone.ToLocal(DateTime.AddZone([date_created_UTC],3))