PC Review


Reply
Thread Tools Rate Thread

how come =date(year(today()),month(today())+6,today()) show 2097?

 
 
dindigul
Guest
Posts: n/a
 
      13th May 2007
While evaluating, everything goes fine till it reaches today(), as 39216 and
suddenly the result is the one given above. Why?


 
Reply With Quote
 
 
 
 
dindigul
Guest
Posts: n/a
 
      13th May 2007
Sorry, got the error.
"dindigul" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> While evaluating, everything goes fine till it reaches today(), as 39216
> and suddenly the result is the one given above. Why?
>



 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      13th May 2007
Maybe you meant:

=date(year(today()),month(today())+6,day(today()))

I wasn't sure if you found a solution or not.

dindigul wrote:
>
> Sorry, got the error.
> "dindigul" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > While evaluating, everything goes fine till it reaches today(), as 39216
> > and suddenly the result is the one given above. Why?
> >


--

Dave Peterson
 
Reply With Quote
 
Harlan Grove
Guest
Posts: n/a
 
      14th May 2007
Dave Peterson <peter...@verizonXSPAM.net> wrote...
>Maybe you meant:
>
>=date(year(today()),month(today())+6,day(today()))

....

Assuming 1900 date system.

That would still leave a bug. Your suggested formula returns the same
day of the month six months from now (in the future). On 14 May 2007,
TODAY()-DAY(TODAY()) returns 39202 (30 April 2007), which is more than
106 years after the beginning of the epoch (31 Dec 1899 net of the
false 29 Feb 1900), which should have put the OP's formula's result
beyond 2114.

I'd bet most Excel users would expect

=DATE(YEAR(TODAY()),MONTH(TODAY())+6,TODAY())

to return the same thing as

=DATE(YEAR(TODAY()),MONTH(TODAY())+6,0)+TODAY()

but the former returns 17 July 2097 and the latter 15 March 2115.

Indeed,

=DATE(YEAR(TODAY()),MONTH(TODAY())+6,TODAY()-DAY(TODAY()))

also returns 17 July 2007, but TODAY() <> TODAY()-DAY(TODAY()), so it
sure looks like DATE() gets seriously confused for large day-of-month
arguments.

 
Reply With Quote
 
Sandy Mann
Guest
Posts: n/a
 
      14th May 2007
"Harlan Grove" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> sure looks like DATE() gets seriously confused for large day-of-month
> arguments.
>


Out of interest, and for the record if for no other purpose, my XL97 rejects
with a #NUM! error, all numbers in the Day argument of the DATE() function
greater then 32766 - 2 short of the greatest Integer number if that has any
significance

--
Regards,


Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(E-Mail Removed)
(E-Mail Removed) with @tiscali.co.uk


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook Today show today task including tasks with no due date Filipe Microsoft Outlook Discussion 0 23rd Jan 2008 09:04 PM
Opening calendar form with today's month & year =?Utf-8?B?cGtlZWdz?= Microsoft Excel Misc 2 17th Dec 2006 07:53 PM
Show only due today and not started tasks on outlook today =?Utf-8?B?cm9tZm9yZGJsdWU=?= Microsoft Outlook Discussion 0 2nd Dec 2005 11:05 AM
Conditional Format (month and year) = Today() =?Utf-8?B?U2NvdHQ=?= Microsoft Excel Worksheet Functions 3 4th Nov 2005 04:52 PM
Show the date closer to today & bigger & smaller than today MyVi Microsoft Access Queries 5 16th Oct 2005 01:36 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:36 PM.