Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Cannot format column to Date format

Hello   I am using an exported CSV as the source. The Data/Time column is formated this way   5/24/23, 12:59:22 PM   If I try to format it as Date/Time in the PowerBI Query I get this ...
  • SanderVeeken's avatar
    SanderVeeken
    3 years ago

    You're mixing up a few things or I'm misunderstanding you. You don't need to change the locale of your Windows environment or of the "file". You only need to change the column data type and select "use locale" and only that column will be affected:

     

     

     

     

     

     

     

     

     

     

     

     

     

    Then select "date/time" and the right locale.

    If you mean that you've appended a bunch of files together and only some of them had the "wrong" locale, then yes that would be a problem. You have to split out the ones that have a different locale and append them after fixing the data type. PowerQuery processes data type operations on the entire column, you can't set a different locale for each cell.