Forum Discussion

Rachael_Tsang's avatar
Rachael_Tsang
Copper Contributor
Jan 25, 2021

How to adjust date to desired format in Power Query?

System date format is DD/M/YYYY hh:mm:ss  which is 25/1/2021 14:08:00 How could I edit in Power Query to make it as what we want? I would like to change into YYYY-MM-DD hh:mm:ss  where it should be...
  • Rachael_Tsang's avatar
    Jan 26, 2021

    Rachael_Tsang 

    I found out the solution my own and would like to share with other people who had the same question. It is pretty simple after I noticed the function. You dont need to use any PQ formula actually. 

     

    So here is my raw data with date format as DD MMM YYYY hh:mm

    where I would like to change it into YYYY-MM-DD hh:mm:ss 

    then I am going to split it into 2 columns which is Update Date and Update Time

    meaning it is should be 1 columns is YYYY-MM-DD while another is hh:mm:ss.

     

    Once I loaded my raw data into PQ, it is turning into DD/M/YYYY hh:mm:ss

    Click the calendar and click the last option [Use region setting] 

    *I am using a Chinese version so the translation is made by myself, it might not be the same as your default language. 

     

    Select Date/Time for date format-preview

    Select Date/Time for date format-previewSelect Date/Time for date format-preview

     

     

    Once you pick the desired format. Change the upper section [Data Type] : Text

    Then select again the one you have chosen. 

     

     

    You Should be able to have this as shown. 

    You Should be able to have this

Resources