title: Converting excel DateTime serial number to R DateTime
body: <p>When excel tables are imported as xy points in ArcGIS I continue to lose my correct DateTime stamp for each point. Thus, I have formatted the DateTime  serial number, created the .shp, and read the .shp into R using readOGR().</p>
  
  <p>Once in R I can convert to the correct date using <code>as.Date()</code> and the <code>origin = "1899-12-30"</code> argument, but the time is left out.  While I have seen examples with a sole Date, I have not seen worked examples with DateTime. I have been using <code>as.Date()</code> as well as <code>as.POSIXct()</code> but this seemingly simple task as been a bit frustrating, thus the post…</p>
  
  <p>I have created a sample data set with 10 rows of the correct DateTime format as well as the excel serial number.</p>
  
  <p>*Thanks Richard and thelatemail for their keen eye on an earlier hindrance.  I have corrected the data and re-posted here. </p>
  
  <p>Here is my sample data</p>
  
  <pre><code>helpData &lt;- structure(list(ID = 1:10, DateTime = structure(c(9L, 1L, 2L, 
  3L, 4L, 5L, 6L, 7L, 8L, 8L), .Label = c("3/11/2011 7:55", "3/13/2011 7:55", 
  "3/14/2011 0:00", "3/14/2011 10:04", "3/14/2011 7:55", "3/15/2011 19:55", 
  "3/17/2011 7:55", "3/18/2011 4:04", "3/4/2011 6:00"), class = "factor"), 
  ExcelNum = c(40606.25, 40613.32986, 40615.32986, 40616, 40616.41944, 
  40616.32986, 40617.82986, 40619.32986, 40620.16944, 40620.16944
  )), .Names = c("ID", "DateTime", "ExcelNum"), class = "data.frame", row.names = c(NA, 
  -10L))
  
  head(helpData)
  </code></pre>
  
  <p>The DateTime is GMT. The time is a 24 hr clock (i.e. not AM/PM). I am working on Windows 7, have the most recent R, and ArcGIS 10.</p>
  
  <p>The code below gets the correct Date, but the time is still missing.</p>
  
  <pre><code>newDateTime &lt;- as.Date(helpData[ , "ExcelNum"], origin = "1899-12-30")
  head(newDateTime)
  </code></pre>
  
  <p>Thanks in advance!</p>