Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Putting the current date in a variable 1

Status
Not open for further replies.

Nomad0803

Programmer
Dec 15, 2006
7
US
I'm trying to reference the current month in an If statement in the Fetch() function, but I can't find an example of the syntax and everything I've tried gives me an error. Does anyone have any examples of the syntax for doing this.

Thanks,
Nomad0803
 
Have you tried

Dim CurrMonth as String

CurrMonth = Format$(Now(),"mmmm")

which should return the full month name
 
Or
If you want a month number

Dim CurrMonth As Integer

CurrMonth = DatePart("m",Now())

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top