Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Changing date format in Power Query Editor

Hi Community..!!

I wanted to change date format (DD-MM-YYYY) into (YYYY-MM-DD) in Power Query Editor

 

I want above dates in the 2018-06-01 in Power Query Editor.

Please help me out to do this..!!

 

  • Hi Anonymous ,

     


     

    I wanted to change date format (DD-MM-YYYY) into (YYYY-MM-DD) in Power Query Editor

     


    Why do you want to change date format from DD-MM-YYYY to YYYY-MM-DD? 

     

    If you want to keep the data type as "Date", it is no need to manually change it in Power Query Editor. It is based on your local machine's date formate. 

     

     

    You can change it in Power BI Desktop later.

     

    If you want to keep the data type as text and since your date column has changed to "Date" type, create a custom column like this:

    Text.From(Date.Year([Date])) & "-" & Text.From(Date.Month([Date])) & "-" & Text.From(Date.Day([Date]))

     

     

    Best Regards,

    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

5 Replies

  • Icey's avatar
    Icey
    Community Support

    Hi Anonymous ,

     


     

    I wanted to change date format (DD-MM-YYYY) into (YYYY-MM-DD) in Power Query Editor

     


    Why do you want to change date format from DD-MM-YYYY to YYYY-MM-DD? 

     

    If you want to keep the data type as "Date", it is no need to manually change it in Power Query Editor. It is based on your local machine's date formate. 

     

     

    You can change it in Power BI Desktop later.

     

    If you want to keep the data type as text and since your date column has changed to "Date" type, create a custom column like this:

    Text.From(Date.Year([Date])) & "-" & Text.From(Date.Month([Date])) & "-" & Text.From(Date.Day([Date]))

     

     

    Best Regards,

    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Icey Thank You So much..!!

  • Anonymous , You can create a new column as text or date

     

    Text.End([Month]) & "-" & Text.Middle([Month],3,2) & "-" Text.Start([Month],2)

     

    #date(Text.End([Month]) , Text.Middle([Month],3,2) , Text.Start([Month],2))

     

    in case if date you can filter data > 2018

     

    in case text > 2018-00-00

    • Anonymous's avatar
      Anonymous
      Not applicable

      I have used below formula 

      But its showing error like this