Forum Discussion
Date.FromText
- 4 months ago
You’re not wrong - the behavior here is confusing.
Date.FromText does support culture, but not in the way you’re trying to use it.
A few clarifications:
- The Culture parameter is mainly used when parsing ambiguous text (e.g. 01/02/2020)
- It doesn’t reliably work when combined with a Format record like in your example
- In some cases, IntelliSense even shows it as unsupported, which adds to the confusion
In practice:
- If you already specify a Format, Power Query relies on that and culture has little to no effect
- Culture is more relevant when you don’t provide a format and Power Query needs to interpret the text
So what you’re seeing is expected - culture won’t have much (or any) impact in your current example.
Odet Maimoni
BI Engineer | Microsoft MVP
I share practical Power BI tips on YouTube
You’re not wrong - the behavior here is confusing.
Date.FromText does support culture, but not in the way you’re trying to use it.
A few clarifications:
- The Culture parameter is mainly used when parsing ambiguous text (e.g. 01/02/2020)
- It doesn’t reliably work when combined with a Format record like in your example
- In some cases, IntelliSense even shows it as unsupported, which adds to the confusion
In practice:
- If you already specify a Format, Power Query relies on that and culture has little to no effect
- Culture is more relevant when you don’t provide a format and Power Query needs to interpret the text
So what you’re seeing is expected - culture won’t have much (or any) impact in your current example.
Odet Maimoni
BI Engineer | Microsoft MVP
I share practical Power BI tips on YouTube