Forum Discussion

AFra's avatar
AFra
Helper III
5 years ago
Solved

Change date format in dataset table

Hi all, 

 

I have a table with 200 date columns.

 

They are displayed in a long format. I'd like to have it displayed such as 26/10/2015

I know how to change the format column by column, but it will be long. Is there a way to change it all at once? 

Thanks in advance! 

Ana 

  • Hi,  AFra 

    Please try follow steps:

    1. Select all fields in the table in the "Model view" (select a field first,then ctrl+A to select all fields)

    2.Change the data type and format as follows:

     

    Best Regards,
    Community Support Team _ Eason
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • v-easonf-msft's avatar
    v-easonf-msft
    Community Support

    Hi,  AFra 

    Please try follow steps:

    1. Select all fields in the table in the "Model view" (select a field first,then ctrl+A to select all fields)

    2.Change the data type and format as follows:

     

    Best Regards,
    Community Support Team _ Eason
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • AFra's avatar
      AFra
      Helper III

      thanks a lot! it works nicely and it's going to save me a LOT of time : ) 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi AFra ,

     

    yes this is possible in the advanced editor.

    First specify the columns you want to change the data like:

    custom1 = List.Skip(Table.ColumnNames(Source),10),             --> this is if you want to select column 10 onwards.

    Then you can change the type of all the slected columns in custom1 by:

     

    changetype = Table.TransformColumnTypes(Source,List.Transform(Custom1, each {_,type date}))

     

    after "type" you can enter the date time you want.