Forum Discussion
lmandrade
10 years agoFrequent Visitor
Convert utc to local time zone using Power Query
Would i like to convert a column [CreatedOn] Table [Opportunity] found in (UTC + 00: 00) to (UTC + 03: 00) Brazil. I need to create a new column to Power Query (Add Column). Can anyone help me? Thank...
- 10 years ago
lmandrade You can use DateTime.AddZone function to achieve your requirement. This function adds the timezonehours as an offset to the input datetime value and returns a new datetimezone value.
DateTime.AddZone([CreatedOn],3)
Reference
https://msdn.microsoft.com/en-us/library/mt253514.aspx - 10 years ago
Opss not get it! I have a column called [ActualCloseDate] I need to adjust down in 3 hours all your data bringing the time of Brazil in a new column. I began to mount the formula but there are so many examples and figures that just getting confused! Could help me with the logic?!?
Anonymous
7 years agoNot applicable
Hi,
Please try DateTimeZone.RemoveZone(DateTimeZone.ToLocal(DateTime.AddZone([#"Date_UTC"],0)))
Hope it helps !
notRonaldo
2 years agoRegular Visitor
Thanks! It works wonders!