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

Clearly you lack the elementary school knowledge too.

You might want to look at
http://en.wikipedia.org/wiki/Leap_year

and the simple algorithm

if year modulo 400 is 0 then leap
else if year modulo 100 is 0 then no_leap
else if year modulo 4 is 0 then leap
else no_leap

Moreover, just do a Google search on leap year (it founda list of 5 million
documents)

"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.