Incorrect Date function

C

cox

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

Dave Peterson

Either that, or the author was told to duplicate the way Lotus 123 worked. That
way there would be no/fewer problems when MS tried to market their software to
the Lotus 123 users.
 
L

Lerner

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

Lerner

Okay, your rule of 100 also applies but this waY:
"DO NOT LEAP" on centuries that are divisible by 100
but not divisible by 400.
Take care.
 
C

cox

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)
 
L

Lerner

Of course I do.
It's been so long. I'M 69.

cox said:
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)
 
R

Ron Rosenfeld

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.

The story I heard:

When Excel was first released, Lotus 1-2-3 had the market almost to itself.
This bug (considering 1900 to be a leap year) was present in Lotus 1-2-3, and
the Excel developers were instructed to maintain it in order to provide
compatibility with their major competitor.

See also http://support.microsoft.com/kb/214326

--ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top