This task calculates the time between two DateTime variables.
| Property | Type | Description |
|---|---|---|
| DateTime1 | DateTime | The first DateTime (beginning of the duration). |
| DateTime2 | DateTime | The second DateTime (end of the duration). |
Null example: If either DateTime1 or DateTime2 has not been set (i.e., is null), the action returns null rather than throwing an error, so it's worth including a null check in your ruleset logic before consuming the result.
Scenario: You want to calculate how long it took to process an order — from the time it was received to the time it was shipped.
Inputs:
| Property | Value |
|---|---|
| DateTime1 | 2024-06-15T08:30:00 (order received — beginning of duration) |
| DateTime2 | 2024-06-15T14:45:00 (order shipped — end of duration) |
Result: A positive Duration of 6 hours and 15 minutes, since DateTime2 is greater than DateTime1.
Comments
0 comments
Please sign in to leave a comment.