VBA - Month Function
The Month function returns a number between 1 and 12 that represents the month of the specified date.
Syntax
Month(date)
Example
Add a button and add the following function.
Private Sub Constant_demo_Click()
msgbox(Month("2013-06-30"))
End Sub
When you execute the above function, it produces the following output.
6
vba_date_time.htm
Advertisements
