Forum Discussion
Help with parsing a date, time and timezone column
- 1 year ago
Hi mouse_art,
Thanks for reaching out!
You're right, Power Query's DateTimeZone.FromText does not support parsing time zone abbreviations like CEST or CET directly using a format string. These abbreviations are ambiguous and aren't currently recognized by the DateTimeZone.FromText parser.
A recommended approach would be to:
- Extract the time zone abbreviation from your string,
- Map it to a corresponding UTC offset (e.g., CEST -> +02:00),
- Rebuild your datetime string in a standard format (like ISO 8601),
- And then pass it to DateTimeZone.FromText.
Hope this helps, If this solution worked for you, kindly mark it as Accept as Solution and feel free to give a Kudos, it would be much appreciated!
Thank you for using Microsoft Fabric Community Forum.
Hi mouse_art,
Thanks for reaching out!
You're right, Power Query's DateTimeZone.FromText does not support parsing time zone abbreviations like CEST or CET directly using a format string. These abbreviations are ambiguous and aren't currently recognized by the DateTimeZone.FromText parser.
A recommended approach would be to:
- Extract the time zone abbreviation from your string,
- Map it to a corresponding UTC offset (e.g., CEST -> +02:00),
- Rebuild your datetime string in a standard format (like ISO 8601),
- And then pass it to DateTimeZone.FromText.
Hope this helps, If this solution worked for you, kindly mark it as Accept as Solution and feel free to give a Kudos, it would be much appreciated!
Thank you for using Microsoft Fabric Community Forum.
Thanks! Fortunately, in my data set, I only had CET and CEST, so it was easy to simply apply ReplaceText to "+01:00" and "+02:00". Then the format string ""dd MMM yyyy h:mm tt zzz" worked!