title: setting column to datetime in R
body: <p>The date in my dataset is like this: 20130501000000 and I'm trying to convert this to a better datetime format in R</p>
  
  <pre><code>data1$date &lt;- as.Date(data1$date, format = "%Y-%m-%s-%h-%m-%s")
  </code></pre>
  
  <p>However, I get an error for needing an origin. After I put the very first cell under date in as origin, it converts every cell under date to N/A. Is this right or should I try as.POSIXct()?</p>