Time duration between two date-times
time_duration_betweenWork out how much time passes between a start and an end date and time, in days, hours and minutes, accounting for daylight saving changes in the chosen US time zone. Use it for shift lengths that cross midnight, elapsed time on a ticket, on-call windows and billing time. Use days_between_dates for whole calendar days, add_time_to_datetime to move a date-time forward or back by a known amount, and military_shift_hours for a shift written in 24-hour times only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_date | Yes | The end date as a calendar date in the form YYYY-MM-DD, for example 2026-11-02. | |
| end_time | Yes | The end time as a 24-hour clock time in the form HH:MM, for example 22:30. | |
| time_zone | No | The time zone the clock times are read in, so a span across a daylight saving change counts the hour that really passes. Use 'none' for plain 24-hour days with no zone. Default America/New_York. | America/New_York |
| start_date | Yes | The start date as a calendar date in the form YYYY-MM-DD, for example 2026-11-02. | |
| start_time | Yes | The start time as a 24-hour clock time in the form HH:MM, for example 22:30. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inputs | Yes | The inputs as used, with defaults filled in. | |
| results | Yes | The computed numbers. Unavailable numbers are null. | |
| summary | Yes | One or two plain sentences with the headline numbers. | |
| calculator_url | Yes | The TeamPredict calculator page that shows the same calculation, where a person can change the inputs. |