[R] Problem with very old dates

From: tom soyer <tom.soyer_at_gmail.com>
Date: Sun 29 Oct 2006 - 16:31:15 GMT


I noticed that as.Date() could not convert date string to date type if the dates are very old. For example, if the date string is "1-Mar-50", then as.Date() would convert this to "2050-03-01", NOT "1950-03-01". This seems to be the behavior of as.Date() for dates older than 1969-1-1, and it is not documented in the R as.Date() documentation. It seems very strange that R would fail to convert old dates correctly. Does anyone know if this is the correct behavior? If so, then which method should one use to convert old dates?



P.S., I am using R 2.4.0 for Windows.

        [[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 and provide commented, minimal, self-contained, reproducible code. Received on Mon Oct 30 03:38:01 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sun 29 Oct 2006 - 23:30:14 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.