On Wed, 11 Jul 2007 17:50:54 +0100
Harold Fuchs wrote:

> Could this be connected to the fact that Excel wrongly believes that 
> 1900 was a leap year?
> Dates are stored as the number of dates since some "epoc" date, often 
> 1/1/1900. Using this we see that, using *Excel*
> 
>  1 Jan 1900 is stored as 0 (zero days *after* 1/1/1900)
> 31 Jan 1900 ........... 30
>  1 Feb 1900 ........... 31
> 28 Feb 1900 ........... 58
> 
> At this point things start going awry. Excel believes there is a 29
> Feb 1900 and, if it saw this date, *would* store it as 59. So we get
> (*wrongly*)
> 
> 29 Feb stored as 59
>  1 Mar        as 60
>  2 Mar        as 61 and so on.
> 
> Of course, because of this phantom 29 Feb,
> 
> 59 should be 1 Mar
> 60 should be 2 Mar
> 61 should be 3 Mar and so on.
> 
> Now, OpenOffice Calc *knows* this so, when it sees a .ods (Calc) file 
> with a date 61 it shows it as 3 Mar but when it sees a .xls (Excel)
> file with the *same* value it adjusts to show it as 2 Mar.
> 

Before someone jumps in and says that 1900 was a leap year i will pipe
up.

All years divisible by 4 are leap years 
 * except all years divisible by 100 are not leap years
 * * Except all years divisible by 400 are leap years.
So 1900 was not a leap year, 2000 was a one in 400 leap year and 2100
will not be a leap year.

http://en.wikipedia.org/wiki/Leap_year#Gregorian_calendar 

-- 
Michael
Linux: The OS people choose without $200,000,000 of persuasion.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to