LastDayOM()

<< Click to Display Table of Contents >>

Navigation:  Available Functions >

LastDayOM()

Syntax

LastDayOM( <DateValue | MonthNumber> )

 

Purpose

To determine the number of days in a month.

 

Parameters

<DateValue | MonthNumber> designates either a date or the number of a month (months are numbered 1..12). If no parameter is specified, DonorQuest will assume you wish to know the number of days for the current month determined by the system date.

 

Returns

A numeric value which is the number of days in the specified date or month number.

 

Usage

To administer due dates and other similar dates, it is useful to know the number of days that remain in a month. Specify either the day's date or month as a parameter, and you get the length of the month in days. If you subtract the number of days until today's date, you are left with the days that remain until month end.

 

Example

The following examples illustrate CMonth():

 

CALL

RESULT

Date()

03/07/2017

LastDayOM( Date() )

31

LastDayOM( 2 )

28