LastDayOfMonth (Function)

image\trumpet2.gif Disclaimer

The LastDayOfMonth function returns the last calendar day of a month.

Syntax

LastDayOfMonth(TargetMonth)

Returns (Integer)

A numeric value representing the last calendar day of the specified month.

Parameters

Name

Type

Description

TargetMonth

Numeric

Sets the number of the month to be evaluated.  

Remarks

Returns 28, 30, or 31, depending on the month being evaluated. There is no consideration given for leap years.

Examples

LastDayOfMonth(03) returns 31, indicating that the 31st is the last calendar day in March.

LastDayOfMonth(Month(Date)) returns the last calendar day of the month using the Month function to get the month number from the Date reserved word.