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

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

Reply
Anonymous
Not applicable

Date Type format restrictions

Hi all,

I'm using an excel file as a data source and the file has a Date column with a certain date type (for example dd.mm.yyyy). Sometimes I received the updated file with rows with different date type (dd-mm-yyyy) and PBI cannot accept it. I can replace the symbol ("-" to ".") from excel or to use the Replace value option in the query, but is there a way to set something like a condition and all symbols different from "." to be replaced with "-" or the incorrect date type automatically to be transformed to the correct one?

Thank you.

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

You can set the query editor to do so. 

 

go to Transform 

then on Query editor, you want to select the step "changed type" on the right-hand side: 

Karlos_0-1595501957190.png

 

Then change the data type on your date column to text ABC (you'll be asked if you want to insert a step, just say yet each time)

Karlos_1-1595502007101.png

 

Now with the date column selected, go to find and replace (from the home tab).

Value to find = ; 

replace with = .

 

Repeat the above sept for each character you want to replace, then change the data type back to date and it should work fine.  

 

 

 

 

View solution in original post

amitchandak
Super User
Super User

@Anonymous , UK date format setup

https://community.powerbi.com/t5/Desktop/How-to-apply-UK-date-format-dd-mm-yyyy-in-Date-slicer/td-p/599712

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , UK date format setup

https://community.powerbi.com/t5/Desktop/How-to-apply-UK-date-format-dd-mm-yyyy-in-Date-slicer/td-p/599712

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

What error are you getting exactly? maybe you could share a screenshot or some sample data? PBI should read that data format just fine.

Anonymous
Not applicable

Hi @Anonymous ,

The error messages are: Expression.Error: We cannot convert the value #date(2020, 5, 22) to type Text. 
or: "We cannot parse the date"

If I replace the wrong symbol with the right one in excel-everything works fine, but my main ask is whether there is an option to set a rule with which the received wrong date to be changed to the correct one. (the wrong date may includes "/"; ","; "-")

Thanks.

Anonymous
Not applicable

You can set the query editor to do so. 

 

go to Transform 

then on Query editor, you want to select the step "changed type" on the right-hand side: 

Karlos_0-1595501957190.png

 

Then change the data type on your date column to text ABC (you'll be asked if you want to insert a step, just say yet each time)

Karlos_1-1595502007101.png

 

Now with the date column selected, go to find and replace (from the home tab).

Value to find = ; 

replace with = .

 

Repeat the above sept for each character you want to replace, then change the data type back to date and it should work fine.  

 

 

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.