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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using the formatdatetime function

Status
Not open for further replies.

neil74

IS-IT--Management
Sep 11, 2001
2
GB
Hi,

I was wondering whether the formatdatetime function could be used to bring up the month only in VBScript. Or perhaps there is a better way to do it. I need this to enter the current month in a form.

Cheers
 
I would suggest using the month() function and not the formatdatetime as this only formats a date to a pre-determined type. Tazzmann
 



neil74,

' Get the month from the date
mm = Month(date)
'
' Shows the month in string format
strMonth = MonthName(mm, true)


fengshui1998
 
Thanks guys; worked a treat.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top