Hi Nigel,

23457 is right, confirmable by "finger counting". I guess Excel erronously includes 
both 1900 as leap year + both end dates in its
count.
64 * 365 + 15 leap days (1904-1960) + 31 + 29 (Feb'64) + 22 = 23457

Or maybe it's not the Gregorian calendar that's featured in Excel, but a new 
"Gatesian" calendar ;-D

Best regards/Med venlig hilsen
Lars V. Nielsen
GisPro, Denmark
http://www.gispro.dk/
http://hjem.get2net.dk/lars-online/
WGS84: 10.20'40"E 55.20'20"N
----- Original Message -----
From: "Nigel Tidswell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 21, 2003 4:41 AM
Subject: MI-L Date Calculations


> Dear List
>
> I think I have hit a date calculation problem in MapInfo 7.0 on Win 2K.
>
> According to the manual, a date value subtracted from another date value
> will give the number of days between the 2 dates.  For example, the code
> below pasted into the MapBasic window will report 23,457 days between
> the 2 dates.  A quick check in Excel will say 23,459 days.  Which should
> I believe?
>
> Example code:
> dim basedate as date
> dim adate as date
> dim nodays as integer
>
> basedate = "01-01-1900"
> adate = "23-3-1964"
> nodays = adate - basedate
> note nodays
>
>
> TIA
>
> Nigel Tidswell
> System Administrator, Works Asset
> Napier City Council
> Private Bag 6010
> Napier
> New Zealand
>
>
>
> ######################################################################
> Attention:
> This e-mail message and accompanying data may contain information
> that is confidential and subject to legal privilege. Any information
> provided is given in good faith. However unless specifically stated
> to the contrary, Napier City Council accepts no liability for the
> content of this e-mail or for the consequences of any action taken on
> the basis of the information provided, unless that information is
> subsequently confirmed in writing. If you are not the intended recipient,
> you are notified that any use, dissemination, distribution or copying
> of this message or data is prohibited. If you received this e-mail
> message in error, please notify us immediately and erase all copies
> of this message and attachments. Thank you.
> ######################################################################
>
> ---------------------------------------------------------------------
> List hosting provided by Directions Magazine | www.directionsmag.com |
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> Message number: 5032
>
>


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 5051

Reply via email to