ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Incorrect Date function (https://www.excelbanter.com/excel-worksheet-functions/219624-incorrect-date-function.html)

cox

Incorrect Date function
 
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.

Dave Peterson

Incorrect Date function
 
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.



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.


--

Dave Peterson

Lerner

Incorrect Date function
 
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.


smartin

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.


Lerner

Incorrect Date function
 
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.
"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.


cox

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.


Lerner

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

"cox" wrote:

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.


Ron Rosenfeld

Incorrect Date function
 
On Sat, 7 Feb 2009 15:49:01 -0800, cox wrote:

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


All times are GMT +1. The time now is 02:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com