Forum Discussion
maricci1
9 months agoNew 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 ...
pankajnamekar25
9 months agoSuper 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: