How to Use Relative Dates in Journey Conditional Match Nodes

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:

  • now represents the time at the start of the current minute. In a Journey condition, now represents 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 - Years
    • M - Months
    • w - Weeks
    • d - Days
    • h or H - Hours
    • m - Minutes
    • s - 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 ago
  • now+1w+2d+5m - 1 week, 2 days and 5 minutes from now
  • now+2M-3d - 3 days before 2 months from now
  • now/d - Midnight 12am UTC at the start of the current day
  • now/h+1d - 3:00pm UTC tomorrow
  • now/h+1M-5h - 10:00am UTC, one month from today
  • now/w - Midnight 12am UTC at the start (Monday) of the current week

Additional Notes

  • now is 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-29 plus one year is 2021-02-28
    • 2020-03-31 minus one month is 2020-02-29
    • 2020-02-28 minus one month is 2020-01-28