Leap year date problem

  • Thread starter Thread starter peter.thompson
  • Start date Start date
P

peter.thompson

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
 
=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.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top