Time between two dates
date_diffCalculates the exact time between two dates/times: a calendar breakdown (years, months, days, hours, minutes, seconds) plus totals in days, hours, minutes and seconds, and the number of calendar days. Negative if end is before start.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | Date/time in ISO 8601 (e.g. "2026-03-08T14:30", "2026-03-08T14:30:00Z", "2026-03-08"), "YYYY-MM-DD HH:mm", a Unix timestamp in seconds or milliseconds, or "now". | |
| start | Yes | Date/time in ISO 8601 (e.g. "2026-03-08T14:30", "2026-03-08T14:30:00Z", "2026-03-08"), "YYYY-MM-DD HH:mm", a Unix timestamp in seconds or milliseconds, or "now". | |
| timezone | No | Time zone for inputs without an offset. IANA time zone name, e.g. "America/New_York", "Europe/London", "Asia/Tokyo", or "UTC". Fixed offsets like "UTC+5:30" also work. Defaults to UTC. |