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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.