Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a date with Date Time Values. This DateTime is in IST time zone. I used DateTime.AddZone("Date Column Name", -6) to convert this to MST (Mountain Standard Time). But the resulting DateTime is not correct as you can see below.
Time is converted correctly but the Denver time for the given India time should be 1/3/2019 5:30 AM instead of 1/4/2019 5:30 AM. Why the date is 4th instead of 3rd?
Solved! Go to Solution.
Thank you so much for replying. I finally got the result by doing the below.
Hi kvijayrs173,
If you mean achieve the -6 hour switch datetime based on the local datetime, you can create a custom column using power query below:
= DateTimeZone.SwitchZone(DateTimeZone.LocalNow(), -6, 0)
If you mean achieve the -6 hour switch datetime based on the india column, you may use power query below:
= [India Time] - #duration(0, 6, 0, 0)
You can also refer to the attached sample pbix file.
Regards,
Jimmy Tao
Thank you so much for replying. I finally got the result by doing the below.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
117 | |
104 | |
77 | |
73 | |
50 |
User | Count |
---|---|
145 | |
109 | |
108 | |
90 | |
64 |