-
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
-
-
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
-
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")
-
Pass the Date variable that DateAdd() returns into your Format() call (instead of Now)
-
-
Hey guys thanks alot :-)
Sorry for being an idiot today...sometimes I don't know if I'm
coming or going.
Thanks,
Ron