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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

HELP - We couldn't parse the input provided as Date Value

Hi Guys, 

I am trying to convert period date column from text to a date format, but somehow it returns an error. I've tried looking for answers in the forum (Split dates and merge/changing locale) , however still getting an error for this. Is there any workaround for this?

 

adrianchy_0-1636336929522.png

Regards



 

1 ACCEPTED SOLUTION
FarhanAhmed
Community Champion
Community Champion

Kindly check if this resolves your problem.

 

1. Edit the table 

2. Split the column with '/' custom delimiter

3. Re-arrange the columns to see the month in first and date column to next and year to the last.

4. Select all the three columns.

5. Right click-> Merge columns with a custom delimiter '/'.

6. Transform the column to change the data type to 'Date'

 

Ref: Solved: How to convert dd/mm/yyyy to mm/dd/yyy or any date... - Microsoft Power BI Community

Ref: Solved: Date Change from DD-MM-YYYY - Microsoft Power BI Community

 







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




View solution in original post

8 REPLIES 8
FarhanAhmed
Community Champion
Community Champion

Kindly check if this resolves your problem.

 

1. Edit the table 

2. Split the column with '/' custom delimiter

3. Re-arrange the columns to see the month in first and date column to next and year to the last.

4. Select all the three columns.

5. Right click-> Merge columns with a custom delimiter '/'.

6. Transform the column to change the data type to 'Date'

 

Ref: Solved: How to convert dd/mm/yyyy to mm/dd/yyy or any date... - Microsoft Power BI Community

Ref: Solved: Date Change from DD-MM-YYYY - Microsoft Power BI Community

 







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




Anonymous
Not applicable

This reply solved my question. 

Steps to solve:

1. Split initial date format into 3 columns date ,month and year (using extract function)

2. Combine/merge in order of year/month/date

3. Change format from text to date

4. Error does not appear

Anonymous
Not applicable

Hi Farhan,

yes i've tried this. refer to the merged column in my first post. This was created based on splitting the characters by delimiters and then merging them . After converting to date, an error appears. 


For Merging columns you need to view order of the column that you are merging.

 

check for similar statement below in your power query code. and make sure that the columns that are combining are in order of YYYY-MM-DD

 

 #"Merged Columns" = Table.CombineColumns(#"Split Column by Delimiter",{"DT.3", "DT.2", "DT.1"},Combiner.CombineTextByDelimiter("-", QuoteStyle.None),"Merged")

 







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




Jihwan_Kim
Super User
Super User

Hi,

I am not sure if you want to use Month/Day/Year format or Day/Month/Year format.

 

I assume you want to use Day/Month/Year format.

Please try the below.

 

In power query editor,

select the column -> right click -> change type -> using locale -> select your version

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Anonymous
Not applicable

Hi Jihwan ,

I've already tried changing locale, but still showing error. 

Thanks

Can you share your sample pbix file's link (One Drive link or any other link) and let me see the Power Query Editor?

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Anonymous
Not applicable

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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