Skip to content
Prev 360203 / 398503 Next

as.Date

Date data cannot represent hour data. You need to use POSIXct or perhaps the chron class from the chron package. 

To use POSIXct, use ISOdatetime instead of ISOdate. Also be careful which timezone you have set as default (in most operating systems calling Sys.setenv(TZ="Etc/GMT") or similar will get you started) when you invoke ISOdatetime, since daylight savings can complicate things. Of course if daylight savings is built into your data already then  you are better off choosing a timezone that understands that. See ?DateTimeClasses.