I am converting dates formatted as "Mar.01" and I thought it would be straightforward to cast using standard formatting rules, but I have an issue with it.
For example, if I produce a date like so:
format(Sys.Date(), "%b%y")
[1] "May13"
I cannot convert it back to a date object using the same pattern::
as.Date(format(Sys.Date(), "%b%y"),"%b%y")
[1] NA
I tried escaping the latter format term with \\
but same result--NA
.
What did I miss?