[R] ISOdate returns incorrect date?

Gabor Grothendieck ggrothendieck at myway.com
Wed Nov 19 18:01:06 CET 2003



One other point that supports your hypothesis is that Excel 2000
on Windows 2000 has a problem in 1900 too.  Enter a date into a 
cell and then enter =60 and it gives the date as Feb 29, 1900 even
though 1900 is not a leap year.   

Windows Excel uses 1900 as the origin for time but when 
Microsoft later created the Mac version of Excel they changed 
the origin to 1904 -- presumably they had realized 
their error by that time.  Excel 2000 allows you to change the default
origin from 1900 to 1904 which allows Windows Excel to properly
read Mac spreadsheets.  See the following for more info on this
and how to set the origin in Excel:

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q180/1/62.asp&NoWebContent=1


--- 
Date: Wed, 19 Nov 2003 16:33:51 +0000 (GMT) 
From: Prof Brian Ripley <ripley at stats.ox.ac.uk>
To: Heiko Schaefer <heiko.schaefer at swissrisk.com> 
Cc: <r-help at stat.math.ethz.ch> 
Subject: RE: [R] ISOdate returns incorrect date? 

 
 
Well, one clue is that date is before the modern era, and most OSes only
go back to 1902. Some only go back to 1970! I suspect the OS does not
know that 1900 was not a leap year.

On Wed, 19 Nov 2003, Heiko Schaefer wrote:

> 
> Does this really work for you? I still get:
> > ISOdate(1900,6,16)
> [1] "1900-06-15 14:00:00 Westeuropäische Sommerzeit"
> > ISOdate(1900,6,16,tz="")
> [1] "1900-06-15 12:00:00 Westeuropäische Sommerzeit"
> 
> Obviously the time son influences the time, but it can
> Not possibly account for the difference of a full day?!
> 
> Still puzzled...
> 
> Heiko


-- 
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help




More information about the R-help mailing list