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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
SkorpionAAM
Helper V
Helper V

Chnage Date for from Text (with differnet Format) to Date Format

I have data wehere dates are totally wrong format here is some sample please any one can tel me how to fix in sample data some are dd/mm/yy and some mm/dd/yyyy and so on

i want proper date format (dd/mm/yyyy)

 

21/5/19 11:28
15/5/19 15:07
4/2/2020 7:55
21/5/19 12:02
7/22/19 16:42
15/5/19 11:55
15/5/19 14:14
15/5/19 14:28
15/5/19 14:54
15/5/19 15:00
25/5/19 13:36
4/2/2020 10:27
4/2/2020 8:19
4/2/2020 8:27
23/7/19 9:36
4/2/2020 8:37
16/5/19 14:28
16/5/19 14:35
4/2/2020 12:07
4/2/2020 8:50
4/2/2020 9:00
16/5/19 8:45
16/5/19 10:06
20/6/19 13:23
16/5/19 14:18
16/5/19 14:25
5/22/19 10:55
18/5/19 22:27
4/2/2020 10:19
05/19/19 3:11
5/19/19 18:48
7/23/19 9:36
20/6/19 19:19
4/2/2020 9:11

 

 

 

 

 

6 REPLIES 6
amitchandak
Super User
Super User

@SkorpionAAM , how would decide for  the dates where both month and date are below 12

no there i some abve 12 as well as i said there are diffrent format

@SkorpionAAM If you have mixed mm/dd and dd/mm I don't know how you could determine which is which for all cases unless you have something else in the data that might identify which format it is in, are there any patterns?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

nope .. that the main problem

Greg_Deckler
Super User
Super User

@SkorpionAAM - So normally in Power Query I do something like this:

  1. Split on space
  2. Split on /
  3. Change type to text for these intermediate columns
  4. Recombine the columns using & in a new column
  5. Change to date
  6. Remove intermediate columns

Happens quite a bit here with people posting dates in European format and I'm in US.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

i tried that option but still getting error

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.