The function ecx:filterDateRange searches a column for date values between specified start and end dates and returns the entries that match. The value returned is an object type.

Example

A message includes all purchases from a linked related data set named ​Purchases which took place between 1 April 2011 and 7 April 2011. Purchase dates are saved in a column named ​Date. For purchases that took place in the selected time period, the data in the columns ​Article and ​Description are inserted into the email message. The ​ForEach​ loop that inserts the information into a message is constructed as follows:

<%ForEach var="count" items="${ecx:filterDateRange(user.relatedAttribute['Purchases'],'Date', '01.04.2011','01.07.2011')}"%>

<%${count.Article}%>

<%${count.Description}%>

<%/ForEach%>
CODE

Structure​

ecx:filterDateRange(object, string, string, string)

Parameters​

Parameter

Description

object

Specifies the location of the data to filter.

string

Specifies the column that contains the date value evaluated by the filter.

string

Specifies the beginning of the date range. The date format is either ​DD.MM.YYYY​ or ​yyyy-MM-dd​. If left empty, the selection is limited by end date only.

string

Specifies the end of the date range. The date format is either ​DD.MM.YYYY​ or ​yyyy-MM-dd​. If left empty, the selection is limited by start date only.