The Duration Ruleset variable type can be used to calculate the time between two DateTime variable types, or used to increment/decrement a DateTime value. You can safely manipulate duration values in your data without the need for manual editing or custom rules.
In conjunction with this variable type, the Duration category of Ruleset Actions is available.
Action | Description |
---|---|
CreateDuration | This task creates a Duration variable to be used with a DateTime variable. |
CalculateDuration | This task calculates the time between two DateTime variables. |
DurationEquals | This task checks to see if two Duration variables are equal and returns a boolean result. |
AddDurationtoDateTime | This task adds to or increments Duration from the DateTime value. |
SubtractDurationFromDateTime | This task subtracts or decrements Duration from the DateTime value. |
Creating a Duration Variable
These steps take place in the Ruleset editor's Variables section.
- Click Add Variable.
- Type the name you wish to give the variable.
- Select Duration from the Type drop-down.
- Click OK to complete this task.
Result: The new variable (shown as ) now appears as an option in the Variables pane.
Example
This Ruleset example shows four Composite Rules using the Duration variable type and several supporting Actions.
Each Composite Rule is working with a common DateTime variable having these values.
Composite Rule #1
Composite Rule #2
Composite Rule #3
Composite Rule #4
Comments
0 comments
Please sign in to leave a comment.