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

Converting Date Format

Hi

I've an excel file that has the date in the following format:

15.04.2022 (DD.MM.YYYY).

When I import to PowerBI, it assumes the date format is (MM.DD.YYYY).

 

What can I do to make PowerBI knows that in Transformation, it's (DD.MM.YYYY) and not (MM.DD.YYYY).

I tried to add step "Using Locale" and I selected English (Canada), but it didn't work.

YJAMOUS_0-1652390719035.png

 

The following is supposed to be 1st May 2022 but it shows as 5th Jan 2022.

 

YJAMOUS_1-1652390858721.png

 

 

 

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can split the date column with "-" and then add custom columns to regroup your dates.

1.Change the date column to text type.

vstephenmsft_0-1652857833978.png

2.Split the date column with "-".

vstephenmsft_1-1652857890557.png

vstephenmsft_2-1652857897519.png

3.Before you add a custom column to regroup, make sure three date columns are text type.

vstephenmsft_3-1652857973849.png

4.Add the custom column.

vstephenmsft_5-1652858078652.png

vstephenmsft_6-1652858096076.png

5.Change the new date column to date type, remove the other unneeded columns. And its format is "MM/DD/YYYY".

vstephenmsft_7-1652858167815.png

vstephenmsft_8-1652858225506.png

 

Best Regards,

Stephen Tao

 

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

 

 

 

 

 

View solution in original post

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can split the date column with "-" and then add custom columns to regroup your dates.

1.Change the date column to text type.

vstephenmsft_0-1652857833978.png

2.Split the date column with "-".

vstephenmsft_1-1652857890557.png

vstephenmsft_2-1652857897519.png

3.Before you add a custom column to regroup, make sure three date columns are text type.

vstephenmsft_3-1652857973849.png

4.Add the custom column.

vstephenmsft_5-1652858078652.png

vstephenmsft_6-1652858096076.png

5.Change the new date column to date type, remove the other unneeded columns. And its format is "MM/DD/YYYY".

vstephenmsft_7-1652858167815.png

vstephenmsft_8-1652858225506.png

 

Best Regards,

Stephen Tao

 

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

 

 

 

 

 

PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

Change Type using Locale telsl PQ what format the date is coming from not what it is going to.  So your dates are curently in a UK or AU format so try changing format using locale and selecting English(UK) or English (Australia) then the dates will convert and if your system is set up as Canadian, they should display as YYYY-MM-DD.

 

regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


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.