View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
smartin smartin is offline
external usenet poster
 
Posts: 915
Default Incorrect Date function

Incorrect, leap years are evenly divisible by 4, but not by 100, unless
by 400. Google "leap year".

The OP was correct on both accounts.

Lerner wrote:
SORRY but you got it all WRONG:
LEAP YEAR : if multiple by 4 BUT NOT MULTIPLE BY 400.
Is the opposite, and nothing to do with 100.
Regards.

"cox" wrote:

Excel help says the following:
"Microsoft Excel stores dates as sequential numbers which are called serial
values. By default, January 1, 1900 is serial number 1, and January 1, 2008
is serial number 39448 because it is 39,448 days after January 1, 1900. Excel
stores times as decimal fractions because time is considered a portion of a
day."

This is wrong - there are 39,447 days between January 1, 1900 and January 1,
2008. The format function specifies February 29, 1900 was a Wednesday. There
was no February 29 in 1900 because 1900 was not a leap year. Whoever wrote
the date function did not know what is considered an elementary school
knowledge that a year that is multiple of 100 is leap year if and only if it
is a multiple of 400.