I have a date inserted in cell a1 (28/2/2007). In cell A2 I want the
date at the end of Feb 2008. I am using the following formula:
=DATE(YEAR(A1) 1,MONTH(A1),DAY(A1))
The date returned is 28/2/2008. This should be 29/2/2008
Any ideas how to overcome this??
Cheers
Peter--
peter.thompson
------------------------------------------------------------------------
peter.thompson's Profile: www.excelforum.com/member.php...oamp;userid=29686
View this thread: www.excelforum.com/showthread...hreadid=499584=date(year(a1) 1,month(a1) 1,0)
The zeroeth day of any month is the last day of the previous month.
(Same with months and years--the zeroeth month of any year is December of the
previous year.)
quot;peter.thompsonquot; wrote:
gt;
gt; I have a date inserted in cell a1 (28/2/2007). In cell A2 I want the
gt; date at the end of Feb 2008. I am using the following formula:
gt;
gt; =DATE(YEAR(A1) 1,MONTH(A1),DAY(A1))
gt;
gt; The date returned is 28/2/2008. This should be 29/2/2008
gt;
gt; Any ideas how to overcome this??
gt;
gt; Cheers
gt;
gt; Peter
gt;
gt; --
gt; peter.thompson
gt; ------------------------------------------------------------------------
gt; peter.thompson's Profile: www.excelforum.com/member.php...oamp;userid=29686
gt; View this thread: www.excelforum.com/showthread...hreadid=499584
--
Dave Peterson
Dave
Got it, thanks for your help
Cheers
Peter--
peter.thompson
------------------------------------------------------------------------
peter.thompson's Profile: www.excelforum.com/member.php...oamp;userid=29686
View this thread: www.excelforum.com/showthread...hreadid=499584
- Aug 14 Mon 2006 20:09
Leap year date problem
close
全站熱搜
留言列表
發表留言