Reputation: 4995
Is there an easy way to transform this string into a meaningful date format?
date <- "Tue Apr 04 10:18:33 +0000 2017"
Right now I would use some regex and then the lubridate
package. But I guess there is a less complicated way.
Upvotes: 1
Views: 37
Reputation: 270268
Try this:
as.POSIXct(date, format = "%a %b %d %H:%M:%S %z %Y")
Upvotes: 3