|
-
Sep 12th, 2001, 09:42 AM
#1
Thread Starter
Hyperactive Member
Number of Months ago.
Hi,
I'm trying to create a function that will calculate the number of months between two dates.
For example:
Sept. 12, 2001 minus July 17, 2000 should yield 14.
Any ideas?
Thanks,
Al.
A computer is a tool, not a toy.
-
Sep 12th, 2001, 09:45 AM
#2
Hyperactive Member
if u use the datediff function
myStr = datediff(interval$,date1,date2[,firstdayofweek [,firstweekofyear]])
"...They even have the internet on computers..." :- Homer Simpson
"Second Place is First Looser" :- No Fear
-
Sep 12th, 2001, 09:45 AM
#3
Frenzied Member
Or perhaps the built in DateAdd function is what you want to use ..... ??
~Peter

-
Sep 12th, 2001, 09:45 AM
#4
PowerPoster
VB Code:
MsgBox DateDiff("m", #7/17/2000#, #9/12/2001#)
-
Sep 12th, 2001, 09:45 AM
#5
Fanatic Member
VB Code:
MsgBox DateDiff("m", #7/17/2000#, #9/12/2001#)
-
Sep 12th, 2001, 10:08 AM
#6
Thread Starter
Hyperactive Member
A computer is a tool, not a toy.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|