Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
IF
Post Prodigy
Post Prodigy

text format date in power query - m

i tried the code: = Date.ToText(Date.From(DateTime.LocalNow()), "dd.MM.yyyy") to get the date in text format, but i got wrong result as attached. it shows "00" instead of "12".  is there any other way to solve it or get the date with dd, mm, yyyy format? thanks in advancePBI12.JPG

4 ACCEPTED SOLUTIONS
tackytechtom
Super User
Super User

Hi @IF ,

 

Try it with "M" instead of "m":
"dd,MM,yyyy"

 

tackytechtom_0-1702655168628.png

 

Let me know if this works 🙂 Do not forget to mark this answer as a solution in case it was the solution. That makes it easier for other people, too.

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

slorin
Super User
Super User

Hi

MM = month

mm = minutes

 

 

View solution in original post

Syndicate_Admin
Administrator
Administrator

Hi @Syndicate_Admin 

Please try below code

 

= Date.ToText(Date.From(DateTime.LocalNow()), [Format="dd MM yyyy"])

 

 


If solved your requirement, please mark this answer as SOLUTION.
If this comment helps you, appreciate your KUDOS 👍

 

Thanks
Pijush

View solution in original post

6 REPLIES 6
Syndicate_Admin
Administrator
Administrator

Hi @Syndicate_Admin 

Please try below code

 

= Date.ToText(Date.From(DateTime.LocalNow()), [Format="dd MM yyyy"])

 

 


If solved your requirement, please mark this answer as SOLUTION.
If this comment helps you, appreciate your KUDOS 👍

 

Thanks
Pijush

slorin
Super User
Super User

Hi

MM = month

mm = minutes

 

 

tackytechtom
Super User
Super User

Hi @IF ,

 

Try it with "M" instead of "m":
"dd,MM,yyyy"

 

tackytechtom_0-1702655168628.png

 

Let me know if this works 🙂 Do not forget to mark this answer as a solution in case it was the solution. That makes it easier for other people, too.

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

No, it is not working to use it as an input to get data from the SAP. 

dttt.jpg

PBI13.JPG

Thanks, but mine is different

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors