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
efeurich
Helper I
Helper I

Converting non-conventional date in conventional date format

Hi there Community,

I have trouble to convert a date format from a project management system to a "normal" date format.

The format that is in the Excel spreadsheet is 2019 - Januari but needs to be converted to 01-01-2019 format.

The odd thing is that some of the entries in the Excel spreadsheet are converted to a valid date format and some are not.

Any suggestions are welcome.

 

Thanks in advance,

 

efeurich

1 ACCEPTED SOLUTION

Hi v-chenwuz-msftm

Thanks for your reply.

The odd thing here is that I tried to replace the values in Transform data, but that didn't work. I ended up changing the data manually in the source xlsx file to resolve this problem.

I have a working data-set now but am still researching this issue.

View solution in original post

3 REPLIES 3
efeurich
Helper I
Helper I

efeurich_0-1663607478223.png

Here a screenshot

Hi @efeurich ,

 

When you change the type of this column to date, the Power query will automatically convert the text to a date via the system's date/time format. 

 

If there is no conversion, it means that your text, the system does not recognize it. Then consider using another method. First separate the years and months then convert the months to numbers.

1 Create a custom column via M query code like:

if [monthtext] = "Januari" then 1 else if [monthtext] = "Februari" then 2 else if........

 

2 And merge the year and month with "/". 

3 change the merged column to date type

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi v-chenwuz-msftm

Thanks for your reply.

The odd thing here is that I tried to replace the values in Transform data, but that didn't work. I ended up changing the data manually in the source xlsx file to resolve this problem.

I have a working data-set now but am still researching this issue.

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.