Forum Discussion
Last Refresh of Data
- 9 years ago
Not to be picky, but that's Power Query "M" language, not DAX. You should be able to use:
DateTime.Time(DateTime.LocalNow()) + #duration(0, -5, 0, 0)
- 9 years ago
Hi Anonymous,
There is a known gap for the time zone displayed in Power BI Service. The time zone in the service is effectively always set to UTC.
There is a workaround to display time in your current time zone. You can use following power query in the Query Editor if your time zone is 5 hours behind Coordinated Universal Time (UTC−05:00). :smileyhappy:
= DateTime.Time(DateTimeZone.SwitchZone( DateTimeZone.FixedLocalNow(), -5 )) & DateTime.Date(DateTimeZone.SwitchZone( DateTimeZone.FixedLocalNow(), -5 ))
Regards
Not to be picky, but that's Power Query "M" language, not DAX. You should be able to use:
DateTime.Time(DateTime.LocalNow()) + #duration(0, -5, 0, 0)
- Anonymous9 years agoNot applicable
Thanks for the clarification.
Below is a representation of the output. I was expectiing 7/13/2017 3:52:50 PM
Thoughts?
- Greg_Deckler9 years agoCommunity Champion
Yes, see formula above. Essentially, it is adding/subtracting hours from the date/time value returned from LocalNow to account for the time zone shift. In your case it looks like you would want to use +5?
- v-ljerr-msft9 years agoMicrosoft Employee
Hi Anonymous,
There is a known gap for the time zone displayed in Power BI Service. The time zone in the service is effectively always set to UTC.
There is a workaround to display time in your current time zone. You can use following power query in the Query Editor if your time zone is 5 hours behind Coordinated Universal Time (UTC−05:00). :smileyhappy:
= DateTime.Time(DateTimeZone.SwitchZone( DateTimeZone.FixedLocalNow(), -5 )) & DateTime.Date(DateTimeZone.SwitchZone( DateTimeZone.FixedLocalNow(), -5 ))
Regards