|
-
Oct 25th, 2002, 10:55 AM
#1
Thread Starter
Addicted Member
Find last month
Hey All,
I'm trying to find an easy way to find what last month was.
I am using the following code to find the current month...
Label1.Caption = Format$(Now, "mmm")
Is there not an easy way to subtract one month from this
statement, so the label would read "Sep" instead of "Oct"?
Thanks in advance,
Ron
-
Oct 25th, 2002, 10:57 AM
#2
Frenzied Member
-
Oct 25th, 2002, 11:07 AM
#3
Thread Starter
Addicted Member
Hey Jordan,
Thanks, but that gives me this result...
9/25/02
11:06:19 AM
I just need it to read - "Sep"
Any other ideas?
Thanks,
Ron
-
Oct 25th, 2002, 11:11 AM
#4
Frenzied Member
I assumed you could manage that bit!
If you can get "Now" to read "Oct" using
Label1.Caption = Format$(Now, "mmm")
I thought that you would be able to format a date that shows September to be just the month?
label1.Caption = format$(Dateadd("m", -1, now),"mmm")
-
Oct 25th, 2002, 11:11 AM
#5
Hyperactive Member
Pass the Date variable that DateAdd() returns into your Format() call (instead of Now)
And I, for one, welcome our new insect overlords. I'd like to remind them as a trusted TV personality, I can be helpful in rounding up others to toil in their underground sugar caves.
-
Oct 25th, 2002, 11:13 AM
#6
-
Oct 25th, 2002, 11:20 AM
#7
Thread Starter
Addicted Member
Hey guys thanks alot :-)
Sorry for being an idiot today...sometimes I don't know if I'm
coming or going.
Thanks,
Ron
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
|