ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   date function ... (https://www.excelbanter.com/excel-worksheet-functions/22485-date-function.html)

jer

date function ...
 
This may be very simple but the result is not what I expect, any help
suggestion would be greatly appreciated.

In cell a1 I have 10/15/2004
in cell b1 I put in the formula
=DATE(YEAR(A1)+1,MONTH(3),DAY(30))

I am expecting the result to be 03/30/2005, however the result I am getting
is 01/30/2005.
Any suggestions
--
thanks as always for the help
jer

N Harkawat

=DATE(YEAR(A5)+1,3,30) give me the correct result


"jer" wrote in message
...
This may be very simple but the result is not what I expect, any help
suggestion would be greatly appreciated.

In cell a1 I have 10/15/2004
in cell b1 I put in the formula
=DATE(YEAR(A1)+1,MONTH(3),DAY(30))

I am expecting the result to be 03/30/2005, however the result I am
getting
is 01/30/2005.
Any suggestions
--
thanks as always for the help
jer




JE McGimpsey

XL stores dates as integer offsets from a base date. Assuming you're
using the 1900 date system, MONTH(3) will return the month of the 3rd
day after 31 December 1899, or 1, for January. Try:


=DATE(YEAR(A1)+1,3,30)

In article ,
jer wrote:

This may be very simple but the result is not what I expect, any help
suggestion would be greatly appreciated.

In cell a1 I have 10/15/2004
in cell b1 I put in the formula
=DATE(YEAR(A1)+1,MONTH(3),DAY(30))

I am expecting the result to be 03/30/2005, however the result I am getting
is 01/30/2005.
Any suggestions


Arvi Laanemets

Hi

MONTH(3)=MONTH("01/03/1900")=1
DAY(30)=DAY("01/30/1900")=30

--
When sending mail, use address arvil<attarkon.ee
Arvi Laanemets


"jer" wrote in message
...
This may be very simple but the result is not what I expect, any help
suggestion would be greatly appreciated.

In cell a1 I have 10/15/2004
in cell b1 I put in the formula
=DATE(YEAR(A1)+1,MONTH(3),DAY(30))

I am expecting the result to be 03/30/2005, however the result I am

getting
is 01/30/2005.
Any suggestions
--
thanks as always for the help
jer




jer

Thanks all for your suggestions ...
jer

"Arvi Laanemets" wrote:

Hi

MONTH(3)=MONTH("01/03/1900")=1
DAY(30)=DAY("01/30/1900")=30

--
When sending mail, use address arvil<attarkon.ee
Arvi Laanemets


"jer" wrote in message
...
This may be very simple but the result is not what I expect, any help
suggestion would be greatly appreciated.

In cell a1 I have 10/15/2004
in cell b1 I put in the formula
=DATE(YEAR(A1)+1,MONTH(3),DAY(30))

I am expecting the result to be 03/30/2005, however the result I am

getting
is 01/30/2005.
Any suggestions
--
thanks as always for the help
jer






All times are GMT +1. The time now is 04:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com