calculateTimeDiff
The calculateTimeDiff task calculates the difference between two timestamps and returns the result as a duration.
Potential use case
Use this task to determine the remaining time (or elapsed time) between a recorded timestamp and today’s date.
Properties
Input variables
Output variables
Example 1
In this example:
- The
firstTimeproperty comes from the output ofaddDuration, another task in the workflow. The reference variable isnewtime. - The
secondTimeproperty comes from thegetTimetask. The reference variable istime. - Because
secondTimeis less thanfirstTime, the outgoingtimeDiffis a positive reference — for example, the number of days until a future date.

Example 2
In this example:
- The
firstTimeproperty comes from thegetTimetask. The reference variable istime. - The
secondTimeproperty comes fromaddDuration. The reference variable isnewTime. - Because
secondTimeis greater thanfirstTime, the outgoingtimeDiffis a negative reference — for example, the elapsed time since thefirstTimedeadline was passed.
