title: r: How to extract month and day for the variable not date format
body: <p>I have a dateset containing date information.
  But I found that this date variable is not date format so <code>lubridate</code> package does not work.
  Here is my date variable</p>
  <pre><code>date &lt;-as.character(&quot;February 2, 2021&quot;)
  mdy(date)  
  [1] &quot;2021-02-20&quot;
  </code></pre>
  <p>So <code>mdy</code> function produces incorrect result.
  I wonder how to convert this variable into date format or
  extract month and day, separately.
  Thank you for your help.</p>