Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hy,
another question for time appeared. I'm converting local to UTC time with summer/ winter time which works. At the end i make a text by
startdate= DateTime.ToText(convertLOCALtoUTCWithDST(start), "yyyy-MM-ddThh:mm:ssZ")
In the result he clears am/pm so 08:00 in the morning is the same as 20:00. Is there any solution for this?
Thank you,
Andreas
Solved! Go to Solution.
Hi @alitzellachner ,
Please try replacing "hh" with "HH":
startdate = DateTime.ToText(convertLOCALtoUTCWithDST(start), "yyyy-MM-ddTHH:mm:ssZ")
Custom date and time format strings | Microsoft Learn
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi @alitzellachner ,
Please try replacing "hh" with "HH":
startdate = DateTime.ToText(convertLOCALtoUTCWithDST(start), "yyyy-MM-ddTHH:mm:ssZ")
Custom date and time format strings | Microsoft Learn
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
thx but in this case i get the same result "2023-03-01T06:00:00Z" and no distinction between summer and winter time. So the problem is the transformation ToText
start= 01.03.2023 20:00:00 +02:00
= DateTimeZone.ToText(DateTimeZone.ToUtc(start), "yyyy-MM-ddThh:mm:ssZ")
I think you can directly use DateTimeZone.ToUtc or DateTimeZone.ToText
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |