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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
maricci1
New Member

Data formatting issue

Hello, I have a problem, when I import data from the MySql database, the date is of type text in the form of mm/dd/yyyy, I can't change the database....and when I transfer that column to date, short date, it just creates mm.dd.yyyy, and then there is a problem, if dd is greater than 12, it gives an error......how can I transfer that column to dd.mm.yyyy

Thanks

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@maricci1 

maybe you can Using Locale and select the proper locale to get the correct date type.

 

11.png12.png





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

5 REPLIES 5
sayan_07
Frequent Visitor

the easy way is just Paste this M Code :  = Date.FromText([Date column Name], "en-US")


2nd Method :

Right Click the Date column in Power Query and Click data type Correct the Date Type

sayan_07_0-1763657328443.png

 


Then Go to Using Locale and change the Locale to English (United States)

 

sayan_07_1-1763657372159.png

 

v-aatheeque
Community Support
Community Support

Hi @maricci1 

Have you had a chance to look through the responses shared earlier? If anything is still unclear, we’ll be happy to provide additional support.

Hi @maricci1 

We wanted to follow up to check if you’ve had an opportunity to review the previous responses. If you require further assistance, please don’t hesitate to let us know.

ryan_mayu
Super User
Super User

@maricci1 

maybe you can Using Locale and select the proper locale to get the correct date type.

 

11.png12.png





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




pankajnamekar25
Super User
Super User

Hello @maricci1 

 

Try this

Add Column → Custom Column and use this formula:

= Date.FromText(Text.Replace([YourDateColumn], "/", "-"), [Format="en-US"])


But if that gives errors, try this manual split + reorder method:

let
parts = Text.Split([YourDateColumn], "/"),
month = Number.FromText(parts{0}),
day = Number.FromText(parts{1}),
year = Number.FromText(parts{2})
in
#date(year, month, day)

 


If my response helped you, please consider clicking
Accept as Solution and giving it a Like 👍 – it helps others in the community too.


Thanks,


Connect with me on:

LinkedIn

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.