On Oct 19, 2010, at 12:12 , jim holtman wrote: > Is this what you are after: > >> date <- '2010-10-19' >> as.POSIXct(date) > [1] "2010-10-19 EDT" >> milli <- 3600000 # one hour in milliseconds >> as.POSIXct(date) + milli / 1000 > [1] "2010-10-19 01:00:00 EDT" >> >
Beware timezone and DST issues though. It might be safer to standardize on GMT (just add tz="GMT" to the as.POSIXct() call.) -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd....@cbs.dk Priv: pda...@gmail.com ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.