Get Date/Time Interval
Command description
Calculate the time interval between two datetimes. When the start time or end time is empty, the current system date and time is used.
Command Input Parameters
| input parameters | Input parameter type | Description |
|---|---|---|
| Start Time | datetime or str | Optional, the date and time as the starting point of the interval or a parsable date and time text, such as 2026-06-20 12:30:00, 2026/06/20; when empty, the current date and time is used |
| End Time | datetime or str | Optional, the date and time as the end point of the interval or a parsable date and time text, such as 2026-06-20 12:30:00, 2026/06/20; when empty, the current date and time is used |
| Time Interval Unit | enum | Second, Minute, Hour, Day |
Command Output Parameters
| Output parameters | Output parameter type | Description |
|---|---|---|
| Time Interval | number | Time interval calculated in selected units |
Supported date and time text formats
When datetime parameters use text, the following formats are supported:
| Format | Example |
|---|---|
| yyyy-MM-dd HH:mm:ss | 2026-06-20 12:30:00 |
| yyyy/MM/dd HH:mm:ss | 2026/06/20 12:30:00 |
| yyyy-MM-dd HH:mm | 2026-06-20 12:30 |
| yyyy/MM/dd HH:mm | 2026/06/20 12:30 |
| yyyy-MM-dd | 2026-06-20 |
| yyyy/MM/dd | 2026/06/20 |
| ISO format | 2026-06-20T12:30:00, 2026-06-20T12:30:00.123456, 2026-06-20T12:30:00+08:00 |
For AI-generated workflows, prefer yyyy-MM-dd HH:mm:ss and avoid unsupported formats such as "June 20, 2026".
AI Workflow Generation Notes
- The start time and end time can be left blank. If left blank, None will be passed during runtime and the current time will be used.
- The start and end values can be datetime objects or parsable date/time text. The output is numeric.