|
-
Mar 20th, 2000, 02:16 AM
#1
Thread Starter
Hyperactive Member
Hi,
I've been working on this for hours and can't come up with the proper code.
I need to calculate the date range for the last complete 6 months in either yyyymmdd or yymm format. e.g. 19990901 to 20000229 or simply 9909 to 0002.
I've tried the year with the month function but get 99 9 instead of 9909.
Any assistance will be greatly appreciated.
Thanks,
Al.
-
Mar 20th, 2000, 02:31 AM
#2
Look up the Format function. If that doesn't help, post some of your code and I sure someone vcan help you.
-
Mar 20th, 2000, 03:25 AM
#3
Thread Starter
Hyperactive Member
Hi,
I didn't have any code. I was working in the Immediate window simply trying to get the date ranges to print. I was also using the Format function.
But since my post I found the DateAdd function which I didn't know about. I think it will serve my purposes.
Print format(DateAdd("m",-6,date),"yymm")
Print format(DateAdd("m",-1,date),"yymm")
Thanks,
Al.
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
|