Reputation: 919
I have a column of data in the form of a string, and I need to change it to date because it is a time series.
200612010018 --> 2006-12-01 00:18
I've tried unsucessfully,
strptime(200612010018,format ='%Y%M%D %H:%MM')
After doing this I need to append one data set to another one. Will I have any problems using rbind() if the column contains dates?
Thanks
Upvotes: 0
Views: 65
Reputation:
You were close. You mixed minutes(%M
) and months (%m
). And the the format
argument needs to follow the format you provide.
strptime(200612010018,format ='%Y%m%d%H%M')
#"2006-12-01 00:18:00
Upvotes: 2