Forum Discussion
Cannot convert date into Local Time zone. Option Working Incorrectly in Power Query Editor
- 3 years ago
Hi , sanjyot_firke
According to your descripition, in AUS havs daylight savings, and you need to judge the date if the time zone changes.
If the date is the fixable , you can use if to judge it like this (example as 6/21 per year):
if Date.Month([Column1]) >6 or (Date.Day([Column1])>=21 and Date.Month([Column1])=6) then DateTimeZone.SwitchZone([Column1],10) else DateTimeZone.SwitchZone([Column1],9)The result is as follows:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Aniya,
Thank you so much for the detailed explanation.
How do we handle daylight savings in this function? Can we use conditional logic?
Sydney, AUS havs daylight savings
Regards,
Sanjyot Firke
Hi , sanjyot_firke
According to your descripition, in AUS havs daylight savings, and you need to judge the date if the time zone changes.
If the date is the fixable , you can use if to judge it like this (example as 6/21 per year):
if Date.Month([Column1]) >6 or (Date.Day([Column1])>=21 and Date.Month([Column1])=6) then DateTimeZone.SwitchZone([Column1],10) else DateTimeZone.SwitchZone([Column1],9)
The result is as follows:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly