Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Unable to date formatting using Direct Query

I'm having this problem when importing my data using direct query:

In the Power Query my data is shown in the the right format (DD/MM/YYYY)

But when I place this column inside a visual that's how it's shown:

Is there any way to change this date to the DD/MM/YYYY format?

 

Thank you in advance, best regards.

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  Anonymous ,

     

    Here are the steps you can follow:

    1. You can Add Column – Custom Column in Power Query Editor.

     

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

     

    2. Or use the custom format.

     

     

    Best Regards,

    Liu Yang

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

4 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Yeah, I tried something like that, but the thing is using Direct Query mode you're not allowed to execute such thing, hence my question.

      • ppm1's avatar
        ppm1
        Solution Sage

        Changing data types in the query editor is different than just changing the format string as vicky_ suggested. Did changing the format string not work?

         

        Pat

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Anonymous ,

     

    Here are the steps you can follow:

    1. You can Add Column – Custom Column in Power Query Editor.

     

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

     

    2. Or use the custom format.

     

     

    Best Regards,

    Liu Yang

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