Reputation: 10444
I have recently started using Power Query in Excel. I have a column formatted in date time for the US locale.
2/8/22 18:40:50
2/11/22 12:06:30
2/11/22 13:16:08
2/28/22 14:03:05
I do not want that. Instead I want ISO 8601
2022-02-08 18:40:50
2022-02-11 12:06:30
2022-02-11 13:46:08
2022-02-28 14:03:05
And as a cherry on top I would actually prefer
2022-02-08 18h40
2022-02-11 12h06
2022-02-11 13h46
2022-02-28 14h03
I am trying to use Power Query Editor > Transform > Date, alternatively > Transform > Add Column > Columns from example. I would even be willing to use Custom Column. I am getting nowhere. Can you please point me in the right direction?
Upvotes: 0
Views: 1752
Reputation: 21393
Try
#"Added Custom" = Table.AddColumn(Source, "Custom", each Date.ToText(Date.From([Date]), "yyyy-MM-dd ") & Text.Replace(Time.ToText(Time.From([Date]),"HH::mm"),"::","h"))
Upvotes: 1