Forum Discussion
dsabsi
9 years agoAdvocate I
How to convert text (data type) to a date (data type)?
Hello guys, I need your help with converting a text column towards a data type. Should i add a column with a certain formula to achieve this? See below the error that I'm getting from thi...
- 9 years ago
Sure (I included some Dutch as well :-) ):
let Source = #table(type table[Verwachte_Start = text],{{"1499032800"},{"1498860000"},{"1493589600"},{"1491170400"}}), AddedUTCDateTime = Table.AddColumn(Source, "Verwachte_startdatum/tijd_UTC", each #datetimezone(1970,1,1,0,0,0,0,0) + #duration(0,0,0,Number.From([Verwachte_Start])), type datetimezone), AddedLocalDate = Table.AddColumn(AddedUTCDateTime, "Verwachte_startdatum_lokaal", each Date.From([#"Verwachte_startdatum/tijd_UTC"]), type date) in AddedLocalDate
MarcelBeug
9 years agoCommunity Champion
The default depends on your Regional Settings in Windows when you create a new Power BI Desktop file.
Again: we didn't get any information how the dates look like, so we just don't know and can only guess.
Just to give you an idea: there are almost 600 different culture codes, that may influence formats (dates, numbers, of course names of days and months) and even the A-Z sort order, e.g. Hawaii puts the vowels up front:
Otherwise of course not all cultures use the characters A-Z as their alphabet.
SivaMani
9 years agoResident Rockstar
MarcelBeug Thank you so much for your valuable information.