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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
RAKESH1986
Helper II
Helper II

convert text in to date-Two format of dates

Hi All,

i am getting below issue, pls help me to resolve this it

 

I have a date field ..but these have two types of values in excel.. one is proper date format (2/1/2023) and another is text format but a date value  (13-01-2023), neither am I unable to convert this in excel nor in power bi..both are giving problem..

 

pls help me with how to solve this problem.

 

RAKESH1986_0-1674818207938.png

 

when I am converting this in date format, getting the below error.

RAKESH1986_1-1674818258787.png

 

 

 

1 ACCEPTED SOLUTION
ronrsnfld
Super User
Super User

Try:  Change Type with Locale => Date => English(United Kingdom)

which will generate this code:

 

#"Changed Type with Locale" = Table.TransformColumnTypes(#"Previous Step", {{"Date", type date}}, "en-GB")
in

 

 

Change #"Previous Step" to the name of that step if you are using this instead of the UI.

If that doesn't work, please share

  • the original source (the type of source -- eg CSV File) of the data,
  • a copy/paste of some data from that source (as text, not a screenshot),
  • the M-Code in the advanced editor and
  • your Windows Regional short date settings.

 

View solution in original post

1 REPLY 1
ronrsnfld
Super User
Super User

Try:  Change Type with Locale => Date => English(United Kingdom)

which will generate this code:

 

#"Changed Type with Locale" = Table.TransformColumnTypes(#"Previous Step", {{"Date", type date}}, "en-GB")
in

 

 

Change #"Previous Step" to the name of that step if you are using this instead of the UI.

If that doesn't work, please share

  • the original source (the type of source -- eg CSV File) of the data,
  • a copy/paste of some data from that source (as text, not a screenshot),
  • the M-Code in the advanced editor and
  • your Windows Regional short date settings.

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.