Duration between
Date and time
Pure
Duration between
Start
1970-01-01T00:00:00Z
Result
End
1970-01-01T00:00:00Z
Description
Pure function returning the duration between two date/times (end minus start).
When to use
Use Duration between to measure the elapsed time between two datetime values —
for example, how long a pipeline step took, or how many days remain until a deadline.
Combine with Now as the end input to measure time since a past event. The result
is a typed duration that can be fed into Add duration or inspected further.
Pins
Input pins
| Pin | Type | Default | Notes |
|---|---|---|---|
| Start | datetime | 1970-01-01T00:00:00Z | The earlier (or reference) datetime. |
| End | datetime | 1970-01-01T00:00:00Z | The later datetime. If end is before start the result is a negative duration. |
Output pins
| Pin | Type | Notes |
|---|---|---|
| Result | duration | The elapsed duration from start to end. |
Example
Log how long ago a stored event timestamp occurred. Wire the Result output of Parse date/time into the Start input of Duration between, and wire the Result output of Now into the End input. The Result output of Duration between expresses how much time has passed since the event, ready to convert and log.