Forum Discussion
Convert utc to local time zone using Power Query
- 7 years ago
Hi ericOnline,
Based on my test, you could refer to below steps in query editor:
Add custom column:
if [ID]=1 then [Date]+#duration(0,2,0,0) else if [ID]=2 then[Date]+#duration(0,1,0,0) else null
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
Hi ericOnline,
Based on my research, you could refer to below link to use the DateTime.AddZone function:
https://community.powerbi.com/t5/Desktop/Convert-UTC-to-client-time-zones/td-p/56337
Regards,
Daniel He
Hello v-danhe-msft. Thank you for the link. I believe I read through this post (and a few others on the topic) yesterday before posting.
The post begins with "...Assuming currently we have the Time and UTC column in a table, where [Time] stores the actual UTC time, [UTC] stores the changed hour count between client and UTC."
I don't have a dedicated table with a Time and UTC column. The data table I'm operating on does have a Time column in UTC format, but it is amongst 12 other columns.
Do I need to create a dedicated TimeTable to make the translations work?
Thank you