Forum Discussion
30rakesh
10 years agoRegular Visitor
Get Current UTC datetime
Hi, Can anyone please suggest me on how to get the current datetime in UTC. I used function Now() but it is returning the current system local time. Thanks Rakesh
SabineOussi
10 years agoSkilled Sharer
Hi rakesh,
I am not aware of a way to do it in DAX, but you can do it in M by going to edit queries and adding a custom column with the formula: DateTimeZone.UtcNow()
If you still want do it in DAX and use it as a measure, you can get your current timezone by using Now() and adding or substrating hours in order to get UTC time.
Hope this helps!
Greg_Deckler
10 years agoCommunity Champion
To subtract 1 hour from NOW, you can use a formula like:
Column = NOW() - 0.04166666666666667
For 2 hours:
Column = NOW() - 0.04166666666666667*2
etc.