Skip to main content

Calculate time difference between dates

Calculates the time between two dates, broken down into years, months, days, hours, and minutes.

Common use cases​

  • Data manipulation Wrkflows
  • Time management

Category​

  • Date & Time

Inputs (what you have)​

NAMEDESCRIPTIONTYPEREQUIREDEXAMPLE
Start dateIn the YYYY-MM-DD HH:MM AM/PM format, provide the start date.DateYes2022-01-25 2:30 PM
End dateIn the YYYY-MM-DD HH:MM AM/PM format, provide the end date.DateYes2022-12-03 4:00 PM

Note: the value of inputs can either be a set value in the configuration of the Wrk Action within the Wrkflow, or a variable from the Data Library section. These variables in the Data Library section are the outputs of previous Wrk Actions in the Wrkflow.

Outputs (what you get)​

For the start and end dates above, the difference is 10 months, 8 days, 1 hour, and 30 minutes. Each output gives one part of that difference. For example, Difference in days gives the 8 days left after counting the 10 full months.

NAMEDESCRIPTIONTYPEREQUIREDEXAMPLE
Difference in minutesThe number of minutes left after counting full hours.NumberYes30
Difference in hoursThe number of hours left after counting full days.NumberYes1
Difference in daysThe number of days left after counting full years and months.NumberYes8
Difference in monthsThe number of months left after counting full years.NumberYes10
Difference in yearsThe number of full years between the start and end dates.NumberYes0

Seconds are not included in the result.

Statuses​

NAMEDESCRIPTION
SuccessThis status is selected when the difference between two dates was successfully calculated.
UnsuccessfulThis status is selected in the event of the following scenarios:- The start and/or end dates are not provided

Requirements​

  • N/A