This document describes how to refer to relative dates in a Conditional Match in a Journey when you want to compare a date from a contact attribute/event property to a relative point in time (not fixed date).
Example Use Case
Check if a lead was created more than a month ago.
Specifying Relative Dates
To specify relative dates in a Journey condition, start with now followed by a "date math expression". For example, now-10d:
nowrepresents the time at the start of the current minute. In a Journey condition,nowrepresents the start of the minute during which Regal Voice processes the node for a given user.- For a date math expression, use one or many instances of
+and-followed by values to add or subtract time - Relative date expressions can include the following identifiers:
y- YearsM- Monthsw- Weeksd- DayshorH- Hoursm- Minutess- Seconds
Rounding
Use an operator such as /d or /h to round a date down to the specified level of granularity. For example:
now/h- Rounds to the beginning of the current hour
Example Relative Date math expressions
For the following examples, assume that the current time is 3:56pm UTC:
now- the current time (3:56pm UTC)now-48h- 48 hours before the current time (3:56pm UTC, two days ago)now-1M-3d-2h- 1 month, 3 days and 2 hours agonow+1w+2d+5m- 1 week, 2 days and 5 minutes from nownow+2M-3d- 3 days before 2 months from nownow/d- Midnight 12am UTC at the start of the current daynow/h+1d- 3:00pm UTC tomorrownow/h+1M-5h- 10:00am UTC, one month from todaynow/w- Midnight 12am UTC at the start (Monday) of the current week
Additional Notes
nowis a UTC time- When adding or subtracting months or years, date math first modifies the month or year, then selects a day number that's as close as possible to the original day number. For example:
2020-02-29plus one year is2021-02-282020-03-31minus one month is2020-02-292020-02-28minus one month is2020-01-28