Month Function

Returns a number between 1 and 12 representing the month of the year of the specified date parameter.

Month (Date)

Parameters

Date - (Input, expression, Optional)

The date value to return. If date is specified as a string expression, Newlook will convert it to a date/time as long as it contains a date and/or time in the form “mmm d, yyyy” (e.g. “Feb 1, 1999”). 

Return Value

An integer between 1 and 12, or Error if date is not a valid date.

Examples

Month (“1 Feb 99”)

Returns 2

Month (“29 Feb 99”)

Returns Error

Month (Now ())

Returns the current month number

Month (Null)

Returns Error

Month (Error)

Returns Error

TIP:

Functions are specifically for use in the Macro Editor. Refer to Microsoft's official VB and JScript documentation for scripting equivalents.

See Also

Date function | DateAdd function | DateDiff function | Day function | Hour function | Minute function | Month function | Now function | Second function | Time function | Week function | WeekDay function | Year function


© 2004-2021 looksoftware. All rights reserved.