Date-times: Get difference between two date-times

Use this action to get the difference between two date-times. The difference is saved as an integer by subtracting the start date-time from end date-time.

Use case

  • Calculate the difference between two date-times
  • Determining the amount of time needed for a task or instance to be completed
  • Determining the number of days until a task is due

How to configure this action

All date-time entries should be formatted in the ISO format: YYYY-MM-DDThh:mm:ss.sTZD. The ISO format for time zone uses a Z or +-hh:mm to represent time zones. All time zones have a +-hh:mm offset.

For example, Z is Greenwich Mean Time, or +00:00, Central Standard Time is -06:00, and Japan Standard Time is +09:00.

An example date-time in Japan Standard Time would be: 2018-03-23T03:00:00.0+09:00.

Fields for this action

  • Start Date-time

    • A fixed date value in ISO format, or a reference
  • End Date-time

    • A fixed date value in ISO format, or a reference
  • Units

    • To return the difference in number of hours, leave blank or enter HOUR
    • For number of minutes, enter MINUTE
  • Return field name

    • The name of the field in which the result should be saved. The step name is used by default.

What will this output?

The output is the integer difference between the Start Date-time and End Date-time, saved to the field defined in Return field name. The output field will be in either hours or minutes based on the Units set.

If the End Date-time occurs chronologically before Start Date-time, the difference will be returned as a negative integer.

Output fields for this action

  • Return field name

    • This field will store the integer difference between the Start Date and End Date. A negative result means the End Date was before the Start Date.


Sorry about that. What was the most unhelpful part?

Thanks for your feedback

We update the Help Center daily, so expect changes soon.

Link Copied

Paste this URL anywhere to link straight to the section.

Need more help?

If you're signed in to Catalytic Community, you can ask other users a question. You'll be redirected to Community where you can add more info.