Forum Discussion
Conversion UTC to local time date
Hi, i have another table the stores the UTCOffsetMin for each day. There are smarter ways of doing this - there are web API's you can subscribe to which claim to be across the daylight saving of each region of the world....
#"Added LoadTimeLocal" = Table.AddColumn(#"Removed columns", "LoadTimeLocal", each [LoadTimeUTC] + #duration(0, 0, [UTCOffsetMin], 0)),
#"Transform LoadTimeLocal" = Table.TransformColumnTypes(#"Added LoadTimeLocal", {{"LoadTimeLocal", type datetime}}),
(you might be able to do the column typing in the one statement)
- ElizabethTachji6 years agoHelper III
After testing many options all day, I ended up creating a custom column and adding 10 hours to the UTC. The 10 hours is the time different. Basically a manual calculation instead of relying on Power BI Dataflow to do the converstion. I ignored daylights saving. I hour difference is Immaterial in this instance.
- frano726 years agoHelper IV
yep - thats pretty much what mine is. in most cases the utcoffset in mins is 600