Compare dates and times in Zaps

Available on plans:

Free

Pro

Team

Enterprise

You can use Formatter to compare how much time has elapsed between a start and end date/time.

1. Add a Formatter step to your Zap

  • In the Zap editor, click the Action step, or click the plus + icon to add an action to your Zap.
  • Select Format.
  • Click the Event dropdown menu and select Date/Time.
  • Click Continue.

2. Customize the compare dates transformation

  • In the Action tab, click the Transform dropdown menu and select Compare Dates.
  • In the Values section, click the Start Date field and select a date field from a previous step.
  • In the Separator field, enter the symbol or text that separates each value in your list. If nothing is entered, the Zap will use a comma by default.
  • Click Continue.
miscEye icon Note

For the Start Date and End Date fields, Formatter will assume:

  • The date is today if no date is entered (only a time is entered).
  • The time is midnight if no time is entered (only a date is entered).
ratingStar icon Tip

To compare a date to today, enter {{zap_meta_human_now}} into the date field. Learn more about using custom timestamps in Zaps.

3. Test your compare dates transformation

  • Click Test step. If the transformation is successful, the date comparison will be shown.
ratingStar icon Tip

The Dates Swapped output field is:

  • False if the end date/time is after the start date/time.
  • True if the end date/time is before the start date/time.

The Same Dates output field only compares dates, not times. It is:

  • False if the date does not exactly match.
  • True if the date exactly matches.
Was this article helpful?
3 out of 6 found this helpful