VBScript MonthNameFunction
Complete VBScript Reference
The MonthName function returns the name of the specified month.
Syntax
MonthName(month[,abbreviate])
| Parameter | Description |
|---|---|
| month | Required. Specifies the number of the month. (For example, January is 1, February is 2, and so on.) |
| abbreviate | Optional. A boolean value indicating whether to abbreviate the month name. Default is False. |
Example
Example 1
Get the name of the 8th month:
<script type="text/vbscript">
document.write(MonthName(8))
</script>
document.write(MonthName(8))
</script>
The output result of the above example is:
August
Try it »
Example 2
Get the abbreviated name of the 8th month:
<script type="text/vbscript">
document.write(MonthName(8,True))
</script>
document.write(MonthName(8,True))
</script>
The output result of the above example is:
Aug
Try it »
Complete VBScript Reference Other Extensions