Month (function)

Syntax Month (date)
Description Returns the month of the date encoded in the specified date parameter.
Comments The value returned is as an Integer between 1 and 12 inclusive. The date parameter is any expression that converts to a Date .
Example This example returns the current month in a dialog box.
Sub Main()
  mons$ = "Jan.,Feb.,Mar.,Apr.,May,Jun.,Jul.,Aug.,Sep.,Oct.,Nov.,Dec."
  tdate$ = Date$
  tmonth! = Month(DateValue(tdate$))
  MsgBox "The current month is: " & Item$(mons$,tmonth!)
End Sub
See Also Day (function) Minute (function); Second (function); Year (function); Hour (function); Weekday (function); DatePart (function).