|
Display the Month name
How can you get the name of the month . Once again
VBScript provides a useful function MonthName(month ,[abbreviate])
. this takes a number between 1 and 12 which represents the
month and has an optional parameter which if set to True will
abbreviate the month . So November becomes Nov .
Code :
<%
Dim theDate , theMonth
'store the month in numerical format in theDate
theDate = Month(Now())
'store the name of the month in theMonth
theMonth = MonthName(theDate)
'display the month name
Response.Write theMonth
%>
|