Reputation: 863
How do I recode of vector of timestamps from a facebook api pull that is a factored looking like the following to a time/date variable?
[[1] 2012-10-19T19:52:43+0000
I tried the following, but I only get NAs:
strptime(as.character(time), "%Y-%b-%dT%H:%M:%S+0000")
Upvotes: 0
Views: 146
Reputation: 176688
Your format is wrong. The %b
should be %m
.
> strptime("2012-10-19T19:52:43+0000", "%Y-%m-%dT%H:%M:%S+0000")
[1] "2012-10-19 19:52:43"
Upvotes: 1