Forum Discussion
Anonymous
5 years agoNot applicable
Format
Hi guys, I have the following question. It is probably very trivial but I want to know how to make a date from "1022020" in pbi = "01.02.2020". Thank you very much! Abba
- 5 years ago
Alright, you should be able to follow the following steps:
Starting table with two dates:
Add this custom column to make all dates 8 digit:Column = if Text.Length([Date]) = 8 then [Date] else "0" & [Date]
Giving the following result:
Finally we add the last column to convert it to the correct format:Column 2 = Text.Start([Column] , 2) & "." & Text.Range([Column] , 2 , 2) & "." & Text.End([Column] , 4)
Giving the following result:
Which you can simply convert to date:
Br,
J
Anonymous
5 years agoNot applicable
I want tp convert it to a date datatype.
tex628
5 years agoCommunity Champion
Alright, you should be able to follow the following steps:
Starting table with two dates:
Add this custom column to make all dates 8 digit:
Column = if Text.Length([Date]) = 8 then [Date] else "0" & [Date]
Giving the following result:
Finally we add the last column to convert it to the correct format:
Column 2 = Text.Start([Column] , 2) & "." &
Text.Range([Column] , 2 , 2) & "." &
Text.End([Column] , 4)
Giving the following result:
Which you can simply convert to date:
Br,
J