Definition and Usage
Find the time difference between two given dates in days, hours, minutes, or seconds. This command calculates the duration between a start date and an end date and returns the result in your selected time unit.
Parameter Values
Input parameters
Parameter | Description | Possible Values | Required | Options / Notes |
Start date | Specify the start date. Select a datetime variable or enter text in commonly used formats | - | Yes | Accepts date strings in standard formats |
End date | Specify the end date. Select a datetime variable or enter text in commonly used formats | - | Yes | Accepts date strings in standard formats |
Time span unit | Select a unit to express the time span | Second(s), Minute(s), Hour(s), Day(s) | Yes | Determines the unit of measurement for the result |
Error handling
Parameter Name | Description |
Throw error & stop | When an error occurs, the action will trigger an error and stop the execution of the entire app. |
Retry command | If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process. |
Ignore error & continue | When an error occurs, the action will be ignored, and the workflow will continue without interruption. |
Variables produced
This command produces a numeric variable that stores the calculated time difference between the two specified dates in the selected time unit.
Using Variables in Conditions
You can use the {x} icon to insert existing variables into the Start date and End date fields. This allows you to dynamically calculate time differences based on variables that might change during execution. The output variable can be used in subsequent actions for time-based calculations, conditional logic, or reporting purposes.
Notes
The command will calculate the absolute time difference, so the result will always be positive regardless of which date comes first.
Ensure date formats are consistent and recognizable by the system to avoid errors.
When working with dates from different time zones, be aware that the calculation will consider the timezone information if provided.
If the dates include time components, the calculation will be precise to the second level.