The Month function returns a month, according to the Gregorian calendar, from a value representing a date and time.


 Month = "MONTH(" val ["," val] ")"

Required Arguments:

Name: DateTimeArg

Type: vAny

An argument that specifies a date and time value.

Optional Arguments:

Name: Locale

Type: vLanguageID

An argument that specifies an LCID to use when parsing DateTimeArg. The default value is specified by the Language property, defined in [ISO/IEC29500-2:2012] section 11, from the Core XML part of a web drawing.

Return Value:

Type: PtgNum, PtgErr

This function attempts a conversion, as described by the DateTime function, of DateTimeArg to a PtgDate parse token. If the conversion is successful, the function returns a PtgNum parse token containing the month component from DateTimeArg. If the conversion fails, the function returns a PtgErr parse token with an error code equal to #VALUE!.