Method: MonthName for VBS
- Updated2024-09-12
- 1 minute(s) read
Methods > Method: MonthName for VBS
Method: MonthName for VBS
Specifies the name of a month.
vMonthName = Object.MonthName(Month, [abbreviate])
Object | VBS Object with this method. You do not need to specify this object. |
Month | Variant Specifies a numeric value for the month, whereby January has the value 1, February has the value 2, and so on. |
[abbreviate] | Variant Specifies whether the MonthName method abbreviates a name of the month. If you do not enter this value, the method uses the False value and does not abbreviate the name. |
vMonthName | Variant Receives the name of the month. |
The following example displays the current name of the month:
Dim iMyMonth, sMyMonth iMyMonth = Month(Now) sMyMonth = MonthName(iMyMonth) Call MsgBox(sMyMonth)
See Also
Related Topics
DateAdd | DateDiff | DatePart | DateSerial | DateValue | Date | Day | Hour | Minute | MonthName | Month | Now | Second | TimeSerial | TimeValue | Time | Timer | Weekday | WeekdayName | Year