Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi I need to convert the following text into Date
Fri Nov 25 05:17:22 +0000 2016
Any idea
Solved! Go to Solution.
In this scenario, you can use PATHITEM() function to split the different date parts in the string into columns. Please refer to formulas below:
Month = PATHITEM(SUBSTITUTE(Table3[Column1]," ","|"),1)
Day = PATHITEM(SUBSTITUTE(Table3[Column1]," ","|"),2)
Time = PATHITEM(SUBSTITUTE(Table3[Column1]," ","|"),3)
Year = PATHITEM(SUBSTITUTE(Table3[Column1]," ","|"),4)
Then you can concatenate them and convert into datetime type.
Datetime = Table3[Month] & " " & Table3[Day] & " " & Table3[Year] & " " & Table3[Time]
Regards,
In this scenario, you can use PATHITEM() function to split the different date parts in the string into columns. Please refer to formulas below:
Month = PATHITEM(SUBSTITUTE(Table3[Column1]," ","|"),1)
Day = PATHITEM(SUBSTITUTE(Table3[Column1]," ","|"),2)
Time = PATHITEM(SUBSTITUTE(Table3[Column1]," ","|"),3)
Year = PATHITEM(SUBSTITUTE(Table3[Column1]," ","|"),4)
Then you can concatenate them and convert into datetime type.
Datetime = Table3[Month] & " " & Table3[Day] & " " & Table3[Year] & " " & Table3[Time]
Regards,
My suggestion would be to split the string.
Next step is to convert to date depending on your requirements:
Dated = ignore time zone
LocalDate = Local date, taking into account the time zone.
let Source = Text.Split("Fri Nov 25 05:17:22 +0000 2016"," "), Dated = Date.From(Source{1}&" "&Source{2}&", "&Source{5}), LocalDate = Date.From(DateTimeZone.From(Source{1}&" "&Source{2}&", "&Source{5}&", "&Source{3}&" "&Source{4})) in Dated or LocalDate
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |