title: Why does "xts" in R cannot recognize my date series?
body: <p>births and dates are from same file and share same length. 
  format of dates seems to be good. But <code>xts</code> cannot recogize it as date,why?! Thanks for your help!</p>
  
  <pre><code>dates &lt;- read.xlsx("TimeSeriesCourseworkData.xls", 1,colIndex=1,as.data.frame=TRUE)
  dates
  
          Month
  1  2009-01-01
  2  2009-02-01
  3  2009-03-01
  4  2009-04-01
  ............
  
  26 2011-02-01
  27 2011-03-01
  28 2011-04-01
  29 2011-05-01
  30 2011-06-01
  
  births &lt;- xts(births, order.by = dates) 
  # Error in xts(births, order.by = dates) : 
  # order.by requires an appropriate time-based object
  
  births &lt;- xts(births, order.by = as.Date(dates))
  # Error in as.Date.default(dates) : 
  # do not know how to convert 'dates' to class “Date”
  </code></pre>