Reputation: 191
I have a column with a string
representing a datetime, where the month name is 3 letters, and there's the time zone info. How do I convert it into a datetime
?
"Jul 13 2020 23:05:58 GMT" --> 2020-07-13T23:05:58.000
Upvotes: 5
Views: 23250
Reputation: 631
Simpler way of doing what Yoni suggested:
print dt = todatetime("Jul 13 2020 23:05:58 GMT")
Upvotes: 2
Reputation: 25895
This will create a table with a single string column, with a single sample record (for the sake of answering your question)
.set Ts <| print s = "Jul 13 2020 23:05:58 GMT"
This will convert each string value in that column/table from string
to datetime
Ts
| extend dt = todatetime(s)
relevant docs:
Upvotes: 11