Converting character into a Date format
<p>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 </p>

<pre><code>var
[1] "Apr 2010" "Apr 2011" "Apr 2012" "Apr 2013"
</code></pre>

<p>class of my variable is a character.</p>

<p>I tried the below command but it is giving me NA</p>

<pre><code>as.Date("Apr 2010", format = "%b %Y")
 [1] NA
</code></pre>

<p>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.</p>