Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
jer
 
Posts: n/a
Default 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
  #2   Report Post  
N Harkawat
 
Posts: n/a
Default

=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



  #3   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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

  #4   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

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



  #5   Report Post  
jer
 
Posts: n/a
Default

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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Function ACase Excel Discussion (Misc queries) 2 March 31st 05 03:11 PM
Using date function in an if statement M Smith Excel Worksheet Functions 2 March 30th 05 06:53 PM
Date function geza Excel Worksheet Functions 2 February 11th 05 04:15 PM
Calculating days between current date and a date in future NETWORKDAYS() function Faheem Khan Excel Worksheet Functions 2 February 10th 05 07:18 PM
Formula for date function Markitos Excel Worksheet Functions 15 November 10th 04 02:05 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"