Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 49
Default Date/time increment specifier

Date + 1 increments the date.
How do you increment date at year, month, hour, min, or second?

Ex: Is there anything more compact for €śDate + 1 year€ť than DATE(YEAR(Date)
+ 1, MONTH(Date), DAY(Date))?

Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default Date/time increment specifier

No.

Regards,
Fred,

"adimar" wrote in message
...
Date + 1 increments the date.
How do you increment date at year, month, hour, min, or second?

Ex: Is there anything more compact for €śDate + 1 year€ť than
DATE(YEAR(Date)
+ 1, MONTH(Date), DAY(Date))?

Thank you.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default Date/time increment specifier

To increment or decrement the number of months in date, you can use the
EDATE function. This requires the Analysis Toolpak to be installed in
versions of Excel prior to 2007. So, if A1 has the date Jan 15, 2008 and
you use =EDATE(A1,1) you'll get Feb 15, 2008. If you use =EDATE(A1,-12),
you'll get Jan 15, 2007.
In the case of leap year, if the date in A1 is Feb 29, 2008 then
=EDATE(A1,12) produces Feb 28, 2009.
As for times, you can increment the time by 1 hour by using =A1+1/24. To
increment by 1 minute, =A1+1/(24*60). To increment by 1 second,
=A1+1/(24*60*60). But if you increment the time this way, you'll have to
adjust the days if time goes beyond 24 hours.
There is a lot of date/time info at www.cpearson.com

Tyro


"adimar" wrote in message
...
Date + 1 increments the date.
How do you increment date at year, month, hour, min, or second?

Ex: Is there anything more compact for "Date + 1 year" than
DATE(YEAR(Date)
+ 1, MONTH(Date), DAY(Date))?

Thank you.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 49
Default Date/time increment specifier


Thank you :)

"Fred Smith" wrote:

No.

Regards,
Fred,

"adimar" wrote in message
...
Date + 1 increments the date.
How do you increment date at year, month, hour, min, or second?

Ex: Is there anything more compact for €śDate + 1 year€ť than
DATE(YEAR(Date)
+ 1, MONTH(Date), DAY(Date))?

Thank you.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default Date/time increment specifier

Correction:
You may have to adjust the date if time goes beyond 24 hours; it may for the
most part correctly adjust the date when you do the add.
I personally think it's best to play with times by using Excel functions.

Tyro

"Tyro" wrote in message
...
To increment or decrement the number of months in date, you can use the
EDATE function. This requires the Analysis Toolpak to be installed in
versions of Excel prior to 2007. So, if A1 has the date Jan 15, 2008 and
you use =EDATE(A1,1) you'll get Feb 15, 2008. If you use =EDATE(A1,-12),
you'll get Jan 15, 2007.
In the case of leap year, if the date in A1 is Feb 29, 2008 then
=EDATE(A1,12) produces Feb 28, 2009.
As for times, you can increment the time by 1 hour by using =A1+1/24. To
increment by 1 minute, =A1+1/(24*60). To increment by 1 second,
=A1+1/(24*60*60). But if you increment the time this way, you'll have to
adjust the days if time goes beyond 24 hours.
There is a lot of date/time info at www.cpearson.com

Tyro


"adimar" wrote in message
...
Date + 1 increments the date.
How do you increment date at year, month, hour, min, or second?

Ex: Is there anything more compact for "Date + 1 year" than
DATE(YEAR(Date)
+ 1, MONTH(Date), DAY(Date))?

Thank you.





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
Exel increment date problem wrt todays date. [email protected] Excel Worksheet Functions 1 November 11th 07 06:58 PM
how to increment time & subtract time? Crackles McFarly Excel Worksheet Functions 9 November 1st 07 10:10 PM
Increment formula for time Ltat42a Excel Discussion (Misc queries) 4 August 2nd 06 11:21 PM
An uneven time-increment smurray444 Charts and Charting in Excel 1 February 8th 06 05:11 AM
Time and Date increment La La Lara Excel Discussion (Misc queries) 0 January 18th 05 09:59 AM


All times are GMT +1. The time now is 05:03 AM.

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

About Us

"It's about Microsoft Excel"