ecm:day
    • 1 Minute to read
    • Dark
      Light

    ecm:day

    • Dark
      Light

    Article summary

    The function ecm:day returns the day component of the referenced date. The first day of the month has a value of 1. The value returned is an integer data type.

    Example

    A specific paragraph is entered if the recipient's date of birth equals the date of sendout.

    The content is inserted into the message with an ​InsertIf​ statement, which is constructed as follows:

    <%InsertIf expression="${(ecm:day(user['DateOfBirth'])==ecm:day(date.Today))and(ecm:month(user['DateOfBirth'])==ecm:month(date.Today))}"%> Text <%/InsertIf%>

    The parameter ​date.Today​ returns the full date (day, month, and year). The function ecm:day extracts the day part from both the user attribute and the date of sendout. The results returned from both functions are compared using the operator ​==​.

    Note that the function ecm:month is used in a similar fashion to check the month part of the date.

    Structure​

    ecm:day(date)

    Parameters​

    Parameter

    Description

    date

    Specifies the target date.


    Was this article helpful?

    What's Next