1. Date Error in MS Works
I have just sent some code to Rob for placement on the Contributions page.
It will convert a date to an integer & vice versa. While trying to check my
earlier attempts at these functions I noticed that my version of MS Works
4.0 (spreadsheet) will allow 29/2/1900 (that's 2/29/1900 in US) to be a
valid date. I was just wondering if the same thing happens in MS Excel.
Anyone?
Yours Truly
Mike
vulcan at win.co.nz
2. Re: Date Error in MS Works
--=====================_1874867==_.ALT
yep... Excel will allow you to enter 2/29/1900. Curiously, if you enter
=datevalue(02/29/1900) it returns "60" which is the number of days from the
start of the Excel calendar. 3/1/1900 returns 61. So 1900 was a leap year...
right?
At 02:19 PM 02/16/2000 +1300, you wrote:
>I have just sent some code to Rob for placement on the Contributions page.
>It will convert a date to an integer & vice versa. While trying to check my
>earlier attempts at these functions I noticed that my version of MS Works
>4.0 (spreadsheet) will allow 29/2/1900 (that's 2/29/1900 in US) to be a
>valid date. I was just wondering if the same thing happens in MS Excel.
>Anyone?
>
>Yours Truly
>Mike
>
>vulcan at win.co.nz
Joel H. Crook
Manager, Information Services
Certified Novell Administrator
Microsoft Certified Professional, OS Specialist
Kellogg & Andelson Accountancy Corp.
14724 Ventura Blvd. 2nd Floor
Sherman Oaks, CA 91403
(818) 971-5100
--=====================_1874867==_.ALT
<html><div>yep... Excel will allow you to enter 2/29/1900. Curiously, if
you enter =datevalue(02/29/1900) it returns "60" which is the
number of days from the start of the Excel calendar. 3/1/1900 returns 61.
So 1900 was a leap year... right?</div>
<br>
<br>
<div>At 02:19 PM 02/16/2000 +1300, you wrote:</div>
<div>>I have just sent some code to Rob for placement on the
Contributions page.</div>
<div>>It will convert a date to an integer & vice versa. While
trying to check my</div>
<div>>earlier attempts at these functions I noticed that my version of
MS Works</div>
<div>>4.0 (spreadsheet) will allow 29/2/1900 (that's 2/29/1900 in US)
to be a</div>
<div>>valid date. I was just wondering if the same thing happens in MS
Excel.</div>
<div>>Anyone?</div>
<div>></div>
<div>>Yours Truly</div>
<div>>Mike</div>
<div>></div>
<div>>vulcan at win.co.nz</div>
<br>
Joel H. Crook<br>
<br>
Manager, Information Services<br>
<font size=1>Certified Novell Administrator<br>
Microsoft Certified Professional, OS Specialist<br>
<br>
</font><b>Kellogg & Andelson Accountancy Corp.<br>
</b><font size=1>14724 Ventura Blvd. 2nd Floor<br>
Sherman Oaks, CA 91403<br>
(818) 971-5100<br>
</font></html>
--=====================_1874867==_.ALT--
3. Re: Date Error in MS Works
- Posted by Joe Otto <joeotto at SWBELL.NET>
Feb 21, 2000
-
Last edited Feb 22, 2000
------=_NextPart_000_000F_01BF7CB0.9AE8CE60
charset="iso-8859-1"
1900 wasn't a leap year, but an old, old spreadsheet that ran under MSDOS
called Lotus 123 thought that it was a leap year. When Microsoft got into
the spreadsheet market, they continued the error for the sake of backward
compatibility. Nice, huh?
FYI, the leap year rule is:
TRUE if the year's evenly divisible by 400 else
FALSE if the year's evenly divisible by 100 else
TRUE if the year's evenly divisible by 4 else
FALSE
Joe
-----Original Message-----
From: Euphoria Programming for MS-DOS
[mailto:EUPHORIA at LISTSERV.MUOHIO.EDU]On Behalf Of Joel Crook
Sent: Monday, February 21, 2000 9:46 AM
To: EUPHORIA at LISTSERV.MUOHIO.EDU
Subject: Re: Date Error in MS Works
yep... Excel will allow you to enter 2/29/1900. Curiously, if you enter
=datevalue(02/29/1900) it returns "60" which is the number of days from the
start of the Excel calendar. 3/1/1900 returns 61. So 1900 was a leap year...
right?
At 02:19 PM 02/16/2000 +1300, you wrote:
>I have just sent some code to Rob for placement on the Contributions page.
>It will convert a date to an integer & vice versa. While trying to check my
>earlier attempts at these functions I noticed that my version of MS Works
>4.0 (spreadsheet) will allow 29/2/1900 (that's 2/29/1900 in US) to be a
>valid date. I was just wondering if the same thing happens in MS Excel.
>Anyone?
>
>Yours Truly
>Mike
>
>vulcan at win.co.nz
Joel H. Crook
Manager, Information Services
Certified Novell Administrator
Microsoft Certified Professional, OS Specialist
Kellogg & Andelson Accountancy Corp.
14724 Ventura Blvd. 2nd Floor
Sherman Oaks, CA 91403
(818) 971-5100
------=_NextPart_000_000F_01BF7CB0.9AE8CE60
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3013.2600" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D200180403-22022000>1900=20
wasn't a leap year, but an old, old spreadsheet that ran under MSDOS =
called=20
Lotus 123 thought that it was a leap year. When Microsoft got into =
the=20
spreadsheet market, they continued the error for the sake of backward=20
compatibility. Nice, huh?</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D200180403-22022000>FYI,=20
the leap year rule is:</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D200180403-22022000> TRUE if the year's evenly =
divisible=20
by 400 else</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D200180403-22022000></SPAN></FONT><FONT color=3D#0000ff =
face=3DArial=20
size=3D2><SPAN class=3D200180403-22022000> FALSE if =
the year's=20
evenly divisible by 100 else</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D200180403-22022000></SPAN></FONT><FONT color=3D#0000ff =
face=3DArial=20
size=3D2><SPAN class=3D200180403-22022000> TRUE if the =
year's=20
evenly divisible by 4 else</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D200180403-22022000> FALSE</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
<DIV align=3Dleft class=3DOutlookMessageHeader dir=3Dltr><FONT =
face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B> Euphoria Programming =
for=20
MS-DOS [mailto:EUPHORIA at LISTSERV.MUOHIO.EDU]<B>On Behalf Of </B>Joel=20
Crook<BR><B>Sent:</B> Monday, February 21, 2000 9:46 AM<BR><B>To:</B>=20
EUPHORIA at LISTSERV.MUOHIO.EDU<BR><B>Subject:</B> Re: Date Error in MS=20
Works<BR><BR></FONT></DIV>
<DIV>yep... Excel will allow you to enter 2/29/1900. Curiously, if you =
enter=20
=3Ddatevalue(02/29/1900) it returns "60" which is the number of days =
from the=20
start of the Excel calendar. 3/1/1900 returns 61. So 1900 was a leap =
year...=20
right?</DIV><BR><BR>
<DIV>At 02:19 PM 02/16/2000 +1300, you wrote:</DIV>
<DIV>>I have just sent some code to Rob for placement on the =
Contributions=20
page.</DIV>
<DIV>>It will convert a date to an integer & vice versa. While =
trying to=20
check my</DIV>
<DIV>>earlier attempts at these functions I noticed that my version =
of MS=20
Works</DIV>
<DIV>>4.0 (spreadsheet) will allow 29/2/1900 (that's 2/29/1900 in US) =
to be=20
a</DIV>
<DIV>>valid date. I was just wondering if the same thing happens in =
MS=20
Excel.</DIV>
<DIV>>Anyone?</DIV>
<DIV>></DIV>
<DIV>>Yours Truly</DIV>
<DIV>>Mike</DIV>
<DIV>></DIV>
<DIV>>vulcan at win.co.nz</DIV><BR>Joel H. Crook<BR><BR>Manager, =
Information=20
Services<BR><FONT size=3D1>Certified Novell Administrator<BR>Microsoft =
Certified=20
Professional, OS Specialist<BR><BR></FONT><B>Kellogg & Andelson =
Accountancy=20
Corp.<BR></B><FONT size=3D1>14724 Ventura Blvd. 2nd Floor<BR>Sherman =
Oaks, CA=20
------=_NextPart_000_000F_01BF7CB0.9AE8CE60--
4. Re: Date Error in MS Works
On Mon, 21 Feb 2000 21:14:14 -0600, Joe Otto wrote:
>1900 wasn't a leap year, but an old, old spreadsheet that ran under MSDOS
>called Lotus 123 thought that it was a leap year. When Microsoft got into
>the spreadsheet market, they continued the error for the sake of backward
>compatibility. Nice, huh?
So are you being sarcastic (just another anti-Microsofty) or are you
commending MS on realizing IBM's error? I wonder how many MS spreadsheets
actually contain this user-entry error (perhaps from an imported DOS-based
Lotus 123 data file)? ... my guess, irrelevant ...
But just to play with the idea, I whipped up a command_line program for
testing...
-------------------------
include get.e
sequence cl, y
integer year, leapyear
cl = command_line()
if length( cl ) < 3 then
puts( 1, "Usage: ly <year>\nReturns: Yes if it's a leap year..." )
abort( 1 )
else
y = value( cl[3] )
if y[1] = GET_FAIL or y[1] = GET_EOF then
puts( 1, "Usage: ly <year>\nReturns: Yes if it's a leap year..." )
abort( 2 )
else
year = y[2]
end if
end if
leapyear = ( ( remainder( year, 4 ) = 0 ) and
( remainder( year, 100 ) != 0 ) )
or ( remainder( year, 400 ) = 0 )
if leapyear then
puts( 1, "Yes, it's a leap year!" )
else
puts( 1, "Nope, it's not a leap year." )
end if
-------------------------
-- Brian
5. Re: Date Error in MS Works
- Posted by Joe Otto <joeotto at SWBELL.NET>
Feb 22, 2000
-
Last edited Feb 23, 2000
A little sarcasm here and there doesn't hurt, right? I tend to be a little
sarcastic by nature. Microsoft was just the unlucky target this time.
Btw, Lotus wasn't part of Big Blue back then. And it's not really a
user-entry error - *all* MS spreadsheets with dates contain the "error"
because it's built into the file format. The dates are actually stored as
the number of days elapsed since 1-1-1900.
Joe
> -----Original Message-----
> From: Euphoria Programming for MS-DOS
> [mailto:EUPHORIA at LISTSERV.MUOHIO.EDU]On Behalf Of Brian Broker
> Sent: Tuesday, February 22, 2000 2:40 AM
> To: EUPHORIA at LISTSERV.MUOHIO.EDU
> Subject: Re: Date Error in MS Works
>
>
> On Mon, 21 Feb 2000 21:14:14 -0600, Joe Otto wrote:
>
> >1900 wasn't a leap year, but an old, old spreadsheet that ran under MSDOS
> >called Lotus 123 thought that it was a leap year. When
> Microsoft got into
> >the spreadsheet market, they continued the error for the sake of backward
> >compatibility. Nice, huh?
>
> So are you being sarcastic (just another anti-Microsofty) or are you
> commending MS on realizing IBM's error? I wonder how many MS spreadsheets
> actually contain this user-entry error (perhaps from an imported DOS-based
> Lotus 123 data file)? ... my guess, irrelevant ...
>