Forum Discussion

SaulM's avatar
SaulM
Frequent Visitor
3 years ago
Solved

Power Query importing excel date field mmm-yy(Dec-21) automatically to 12/21/2022

Hello everyone,    I am banging my head trying to fix something what seems simple. I have some excel files with a column "Date" formated as "DEC-21"(text) and Power Query brings it in automatically...
  • ronrsnfld's avatar
    3 years ago

    If by "fix this" you mean you want to display it the same as in your original Excel sheet, then:

     

    Your data in Excel is a Text string but Power Query is changing it to a Date.  All you need to do is ensure PQ treats it as text.

     

    If you examine the Applied Steps window, you will see that (probably) the second step is something like "Changed Type".  If you select that step, you will see in the formula bar something like: 

     

    =Table.TransformColumnTypes(Source,{{"Date", type date}})

     

    There may be other column names and types also in that line.

     

    All you need to do is edit that line to change type date to type text

     

    If you mean something else by "fix this" then please explain precisely what you want.