Forum Discussion
Anonymous
2 years agoNot applicable
Change Text Column to Date using Date.FromText
Hi there, I hope you can help me here. I 've got a column which is called document_field2 which has dates in it as text. e.g. 80624 170624 Now I try to get these dates using following: ...
- 2 years ago
And if instead you specify a culture, like so:
= Table.AddColumn(#"Gefilterte Zeilen", "Date", each Date.FromText([document_field2], [Culture="en-GB"]), type date)
This converted all dates without issue for me.
I hope this is helpful
Anonymous
2 years agoNot applicable
I've found another solution.
I added a custom column using:
=Text.PadStart(Text.From([document_field2]), 6, "0")
This will add an extra 0 in front when it has not 6 digits.
After that the Date column is working right.
- m_dekorte2 years agoResident Rockstar
And if instead you specify a culture, like so:
= Table.AddColumn(#"Gefilterte Zeilen", "Date", each Date.FromText([document_field2], [Culture="en-GB"]), type date)
This converted all dates without issue for me.
I hope this is helpful