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
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! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |