title: Converting the data in year month day hour and minutes to date in R
body: <p>I am trying to convert the date as factor to date using “as.date” function in R. I have the date in the following format</p>
  
  <pre><code>2008-01-01 02:30
  </code></pre>
  
  <p>I tried to use the following command : </p>
  
  <pre><code>as.Date(mydata$Date, format="%y-%m-%d  %h:%mm")
  </code></pre>
  
  <p>Can somebody help me with this ? I was able to convert the format with no hour but getting difficulty with hour included. </p>
  
  <p>Thank you. </p>