Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join 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
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 19 | |
| 19 | |
| 17 | |
| 11 |
| User | Count |
|---|---|
| 59 | |
| 55 | |
| 42 | |
| 40 | |
| 30 |