ASP/VBScript MonthName() Returns a string indicating the specified month.
ShotDev Focus:
- Using Asp and MonthName() function.
Syntax
MonthName(month[, abbreviate])
The MonthName function syntax has these parts:
Part | Description |
month | Required. The numeric designation of the month. For example, January is 1, February is 2, and so on. |
abbreviate | Optional. Boolean value that indicates if the month name is to be abbreviated. If omitted, the default is False, which means that the month name is not abbreviated. |
Example
asp_monthname.asp
<% Option Explicit %> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <% Response.write MonthName(Month(Now))&"<br>" Response.write MonthName("09")&"<br>" %> </body> </html>
Create a asp file and save to path root-path/myasp/
Run
http://localhost/myasp/asp_monthname.asp
Screenshot