I have a column full of dates in format "mmm dd,yyyy"
.
They look like these:
"Dec 21, 2015"
"Aug 23, 2018"
etc.
I tried to convert those dates to a proper date format for further data processing by doing as.Date("Dec 21, 2015")
or as.Date(as.character("Dec 21, 2015"))
but neither worked.
Here is the error message:
Error in charToDate(x) : character string is not in a standard unambiguous format
I am wondering what is a good way to properly convert such nonstandard data format into proper data format and class "YYYY-MM-DD" (e.g. "2015-12-21")? Should I use regex syntax to solve that?
Thanks so much for your help!