Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
I pull data from Sharepoint folder which contains many CSV files, all files got same layout.
There is a problem with dates, as shown on below image.
Some dates are read by PQ correctly - as mm/dd/yyyy, but some are in incorrect format dd/mmm/yyyy.
How can I unify those dates, to have only the desired type which is mm/dd/yyyy?
I have no idea what approach can I take, what kind of transformation can I do to achieve that...
Initially this column is in "ANY" data type, when I change to "DATE/TIME" format then PQ throws an error, saying:
"We couln't parse the input provided as a DateTime value."
Solved! Go to Solution.
You need to put this formula in a custom column not in formula bar. If you want to put in formula bar, then use following formula where Previous step should be replaced with your previous step
= Table.AddColumn(#"Previous Step", "Custom", each Date.From(Text.Select(Text.BeforeDelimiter([Date Column]," ",{0, RelativePosition.FromEnd}),{"0".."9","/","a".."z","A".."Z"," "})))
Use this formula to convert your existing values to date format (Change Date Column appopriately)
= Date.From(Text.Select(Text.BeforeDelimiter([Date Column]," ",{0, RelativePosition.FromEnd}),{"0".."9","/","a".."z","A".."Z"," "}))
You need to put this formula in a custom column not in formula bar. If you want to put in formula bar, then use following formula where Previous step should be replaced with your previous step
= Table.AddColumn(#"Previous Step", "Custom", each Date.From(Text.Select(Text.BeforeDelimiter([Date Column]," ",{0, RelativePosition.FromEnd}),{"0".."9","/","a".."z","A".."Z"," "})))
Hi Vijay,
amazing formula, worked well for most of records 🙂
I found out that some dates are corrupted, so I needed to clean that up in the source.
Accepted as Solution.
Hello Vijay
thanks for response on that
I tried to use your formula, but it does not work for me or simply I do not know how to use it.
This is my column name and type:
And this is error I get when I use that formula - it seems that formula is not identifying [Execution Date] as a column name:
Any tips how to implement that correctly?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 15 | |
| 14 | |
| 11 | |
| 8 | |
| 8 |