The function ecm:equal determines whether two specified dates are equal. The comparison is exact to the millisecond. The value returned is a Boolean data type.

Example

A selection is used to send a thank you message to group members on the anniversary of the date they signed up for a newsletter. This date is stored in the custom attribute ​WelcomeDate​.

The function ecm:trunc is used to reset the time component for both the current date and the attribute value to zero. It is then possible to use the function ecm:equal to define the selection criteria because the time component is negated. The expression is constructed as follows:

${ecm:equal(ecm:trunc(user.CustomAttribute['WelcomeDate'], 'time')), (ecm:trunc(date.Today, 'time'))}
CODE

Structure​

ecm:equal(date, date)

Parameters​

Parameter

Description

date

Specifies the target date.

date

The date value used for the comparison.