Forum Discussion
Anonymous
3 years agoNot applicable
Date from text issue
Hey Guys, I have a set of data for training and I reach the point where I pivot the data properly yet, when I try to change the data type from text to date format (by changing type or using the ...
- 3 years ago
Date.From(Text.Combine(Splitter.SplitTextByAnyDelimiter({"st ","nd ","rd ","th "})([Attribute]),"-"))
ronrsnfld
3 years agoSuper User
You need to remove the ordinal suffixes.
Something like:
#"Convert to Date" = Table.TransformColumns(#"Previous Step", {
"Attribute", each Date.From(List.Min(List.Accumulate({"st","nd","rd","th"},{}, (state, current)=>
state & {Text.Replace(_,current,"")}))), type date
})