ecm:month
- 1 Minute to read
- Print
- DarkLight
ecm:month
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
The function ecm:month returns the month component of the referenced date. January 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:month extracts the month 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:day is used in a similar fashion to check the day part of the date.
Structure
ecm:month(date)
Parameters
Parameter | Description |
---|---|
date | Specifies the target date. |
Was this article helpful?