Forum Discussion

SkorpionAAM's avatar
SkorpionAAM
Icon for Helper V rankHelper V
6 years ago

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

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    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.

    • SkorpionAAM's avatar
      SkorpionAAM
      Icon for Helper V rankHelper V

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

      • Greg_Deckler's avatar
        Greg_Deckler
        Icon for Community Champion rankCommunity Champion

        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?