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

How to clean the different date format in same column

Dear Community, 

I have a column with date format like these;

the Apr-2019 is the same as Apr-19,  which is month and year.  but I want the date to show the same format in power bi. I have more than 6000 rows, dont want to manual clean it. can someone show a quick way to change it? thank you.

rowdateattribute
row1Apr-2019sales
row2Apr-19forecast
row3May-2019sales 
row4May-19forecast
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try to change the data type to date. I think it will convert it into data after that you can choose any format you want from the column property.

 

For me it became date by default at time of loading

 

or a new column like

if(len[date]) =6 , left([date],4) & "20"& right([Date],2), [Date])

 

 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try to change the data type to date. I think it will convert it into data after that you can choose any format you want from the column property.

 

For me it became date by default at time of loading

 

or a new column like

if(len[date]) =6 , left([date],4) & "20"& right([Date],2), [Date])

 

 

Anonymous
Not applicable

@amitchandak  your code worked, also I found another way(may not be very technical solution), I replaced the - with /1/ to forth the format to the US date format like  Apr/1/19 or Apr/1/2019, 

thanks again

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.

Top Solution Authors