The function ecm:between determines whether a specified date is between a start and an end date. The value returned is a Boolean data type.

Example

A selection verifies whether a recipient is 18 years of age or older. The function ecm:between checks whether the date of birth stored as a user attribute is between today's date and the date 18 years in the past (using the additional function ecm:addInterval to subtract 18 years from today's date). The function is constructed as follows:

${ecm:between(user['DateOfBirth'], ecm:addInterval(date.Today, '-18Y'), date.Today)}
CODE

Structure​

ecm:between(date, date, date)

Parameters​

Parameter

Description

date

Specifies the target date.

date

The value used as a start date.

date

The value used as an end date.