Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Increment a Variable Defined Date by 1 day

I have defined a date variable with a date [MM/DD/YYYY] as the first day of
the week [Monday]. I would like to increment the date variable by 1 day.
This should be straightforward but I am not finding it in my reference book.
Any help would be appreciated.

Example:
strdate = 10/11/2004
I need:
strdate +1 = 11/12/2004
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Increment a Variable Defined Date by 1 day

How do you come to the conclusion that
10/11/2004 plus 1 is 11/12/2004.

If you meant 10/12/2004, then

strDate + 1 gives you the date 1 day later than 10/11/2004 as long as
strDate is a date variable, or a variant loaded with a date.

--

HTH

RP

"JimI" wrote in message
...
I have defined a date variable with a date [MM/DD/YYYY] as the first day

of
the week [Monday]. I would like to increment the date variable by 1 day.
This should be straightforward but I am not finding it in my reference

book.
Any help would be appreciated.

Example:
strdate = 10/11/2004
I need:
strdate +1 = 11/12/2004



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Increment a Variable Defined Date by 1 day

Bob,

Didn't mean to confuse anyone "11/12/2004 was a typo. I was looking to
increment by one day. Thanks for your answer. I had my variable incorrectly
identified as a "single". Fixed and all is well.

Thanks!!!!

"Bob Phillips" wrote:

How do you come to the conclusion that
10/11/2004 plus 1 is 11/12/2004.

If you meant 10/12/2004, then

strDate + 1 gives you the date 1 day later than 10/11/2004 as long as
strDate is a date variable, or a variant loaded with a date.

--

HTH

RP

"JimI" wrote in message
...
I have defined a date variable with a date [MM/DD/YYYY] as the first day

of
the week [Monday]. I would like to increment the date variable by 1 day.
This should be straightforward but I am not finding it in my reference

book.
Any help would be appreciated.

Example:
strdate = 10/11/2004
I need:
strdate +1 = 11/12/2004




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
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM
[Q] msoShapeRectangle: variable not defined Rolf Marvin Bøe Lindgren Excel Programming 4 May 12th 04 10:21 AM
Problem with a defined variable ric Excel Programming 2 April 26th 04 08:42 PM
Increment a variable Harry[_3_] Excel Programming 0 April 9th 04 04:06 PM
Increment a variable while looping ibeetb Excel Programming 2 September 25th 03 07:15 PM


All times are GMT +1. The time now is 06:57 AM.

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"