I have a data frame in which one of my variable is a character. I want to convert it into a date value. It looks like
var
[1] "Apr 2010" "Apr 2011" "Apr 2012" "Apr 2013"
class of my variable is a character.
I tried the below command but it is giving me NA
as.Date("Apr 2010", format = "%b %Y")
[1] NA
Is there any way to solve this kind of problem. Note:- I don't want to add any day . I just want to keep it clean as Month-Year format. There are question regarding conversion of date from character to data on stackoverflow but I do not find similarity with my problem. If you know any resource then please provide it.