A common use case is to keep only customers whose date attribute is tomorrow or later and exclude everyone else. This guide shows you how to build that logic dynamically.
Example case
You have a repeated scenario with a customer date attribute, such as a contract end date.
Customers whose date is in the past or today should be excluded.
Customers with a date tomorrow or later should remain in the audience.
At first glance, this looks like a simple relative date filter. In practice, the standard UI options do not cleanly cover this use case.
Why do the standard date filters not work
0 days ahead
You may first try more than X days ahead and set the value to 0. However, the UI does not accept that value.
Figure 1: The UI rejects more than 0 days ahead.
More than 1 day ahead
You may then try more than 1 day ahead. This does not solve the use case either. That operator compares the date to the current time, not to the next calendar-day boundary. For example, if it is 3:00 PM today and the attribute date is tomorrow at 10:00 AM, the date is tomorrow on a calendar-day level, but it is still less than 24 hours ahead. Because of that, more than 1 day ahead does not cleanly represent tomorrow or later.
Matches range
You may also try matches range with a range that starts tomorrow and ends on a far-future date. This works only as a fixed-date workaround. The start date is absolute, so the condition does not move forward automatically.
Figure 2: A fixed-date workaround with matches range.
Use this workaround only for one-time or temporary setups.
Use a customer expression for dynamic logic
If you need the condition to remain dynamic, create a customer expression that compares the date attribute to the current day at the calendar-day level.
Use this expression:
floor(date_attribute / 86400) - floor(now() / 86400)Figure 3: Customer expression for the whole-day difference from today.
Then use the result in your condition like this:
Days until date >= 1In this example,
Days until dateis the customer expression you created in the previous step.Figure 4: Future-only condition with
>= 1.This keeps only customers with a date tomorrow or later.
How the expression works
This expression converts both values to full calendar days and then compares them.
86400is the number of seconds in one day.date_attribute / 86400converts the attribute timestamp to days since 1 January 1970.now() / 86400converts the current time to the number of days since 1 January 1970.floor(...)removes the time part and keeps only the day value.
Because both sides are rounded down first, the comparison uses calendar days rather than hours and minutes.
Read the result
After you create the expression, read the result like this:
>= 1means the date is tomorrow or later.= 0means the date is today.< 0means the date is in the past.
Use >= 1 when you want future-only logic that excludes both past dates and today.
To target past + today, use the same expression and invert the condition.
A non-matching result for Days until date >= 1, or a direct condition of < 1, gives you past + today.
Figure 5: Past + today condition with not matching.
Conclusion
If you need a dynamic condition, use the customer expression approach. If a fixed setup is enough, use matches range with an absolute future range.