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! It's time to submit your entry. Live now!
Hi,
I wanted to change date format by using power querry. To do that I ve used "Date.ToText" function. In custom column as you can see I am getting "00" instead of month numbers like "02" , "03".
What is to reason for that ? Which function i should use ?
Regards
Solved! Go to Solution.
Hi @kivanct ,
months in the function must be MM because M language is case sensitive. Formula should be then like this:
Date.ToText([Dates],"yyyy-MM")
Overview of all format options can be seen here:
https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings
Dear all, my result shows error, do you know why? i'm sure the column used is datetime format.
Hi @kivanct ,
months in the function must be MM because M language is case sensitive. Formula should be then like this:
Date.ToText([Dates],"yyyy-MM")
Overview of all format options can be seen here:
https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 61 | |
| 43 | |
| 30 | |
| 26 | |
| 23 |
| User | Count |
|---|---|
| 135 | |
| 114 | |
| 58 | |
| 39 | |
| 35 |