If date in date range

Conditionally merges different content depending on whether a date held in a contact's field falls between two dates. Use it to reward a qualifying period, such as everyone whose last order landed inside a promotion.

Syntax

{{#ifInDateRange date startDate endDate}}true content{{else}}false content{{/ifInDateRange}}

Parameters

Name Type Required Description
Date Date Required The date to evaluate, usually a contact field.
Start Date Date Required The first day of the range.
End Date Date Required The last day of the range.
Note: Both dates are included in the range.
Note: This checks a date you supply. To check today's date instead, use If today in date range.
Tip: The {{else}} part is optional. Leave it out and nothing merges when the date falls outside the range, as in the example below.

Examples

The examples below are based on the following sample content:

{{#ifInDateRange Contact.LastOrderDate "10/1/2026" "10/31/2026"}}You qualify for the following discounts.{{/ifInDateRange}}

A. The contact's LastOrderDate has the value 10/15/2026

You qualify for the following discounts.

B. The contact's LastOrderDate has the value 9/30/2026

Nothing is merged.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us