[R] help with POSIX

From: Ghosh, Sandeep <sghosh_at_lexgen.com>
Date: Sat 23 Apr 2005 - 04:43:59 EST

For the r script below

>datestr <- "01/01/2004"
>as.POSIXct(as.Date(datestr, "%d/%m/%Y"))

I get the following output
 "2003-12-31 18:00:00 Central Standard Time"

Why is the date a day before. I guess its something to do with the time, but is there a way to get it to return 2004-01-01 instead?

Thanks in advance...

        [[alternative HTML version deleted]]

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Apr 23 04:48:55 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:22 EST