• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User


  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Convert Dates

Dear Chandoo fans :)

I'm almost going to the bridge and throw myself to the river... :s

I have some .csv files with dates. When exported to powerbi, i can't have the dates ok, probably because of the format. They are with "mm/dd/yyyy" and I need to convert them to "dd/mm/yyyy".

Someone can help me with this?

I just can't do it.

I promise I won't go to the bridge :D

Thank you

Khalid NGO

Excel Ninja

You can edit your query and Go to File > Options and Settings > Regional Settings > Local (for changing Regional Setting) follow below screenshot.

Meanwhile "Stay Home, Stay Safe" :)




Excel Ninja
I'd not change region setting, as that will impact every file that is read via PowerQuery/PowerBi.

Instead, once the data is imported, go into query editor. Click on left corner of the column and find "Using Locale...".
This will allow you to specify the culture/locale of the source file and handle it in M-Code.
Ex: To import English (US) based source into UK based system.
 =Table.TransformColumnTypes(#"Pervious Step Name", {{"DateColumnName", type datetime}}, "en-US")