<< Click to Display Table of Contents >> Navigation: Available Functions > EOM() |
Syntax
EOM( <DateValue> )
Purpose
Determines the date for the last day of a month.
Parameters
<DateValue> designates the date for which the last day of the month is calulated. If you do not specify this parameter, EOM() will use the system date (given by the Date() function) by default.
Returns
A date value.
Usage
EOM() determines the last day of the month in which <DateValue> lies. It also allows you to calculate how many days remain until the end of the month.
Example
The following examples illustrate EOM():
CALL |
RESULT |
---|---|
EOM() - Date() |
Days left in current month. |
EOM( CToD( "02/01/2018" ) ) |
02/28/2018 |
EOM( CToD( "03/20/2018" ) ) |
03/31/2018 |
If you send pledge reminders out on a monthly basis, you may be interested to know which pledge payments come within five days of being past due. In order to create a Template or Custom selection to identify such payments, you would have to know the number of days in the current month. The following EOM() expression would select pledged-linked donations which were received within the last five days of a month:
.Donation_Pledge_ID_Link. > 0 .And.
EOM( .Donation_Date. ) - .Donation_Date. <= 5