Now
- Last Updated: March 24, 2022
- 1 minute read
- Corticon
- Version 6.3
- Documentation
SYNTAX
now
Returns the current system date and time when the rule is executed. This DateTime value is assigned the first time now is used in a Decision Service, then remains constant until the Decision Service finishes execution, regardless of how many additional times it is used. This means that every rule in a Ruleflow containing now will use the same DateTime value.
The Literals row in the table of Summary Table of Vocabulary Usage Restriction applies. No special exceptions.
The following Rulesheet uses now to determine how many hours have elapsed between now anddateTime1 (see .hoursBetween for
more details on this operator), and assign a value to string1 based on the result.A sample Ruletest provides two
examples of dateTime1. Assume now is equal to March 1, 2018 14:20:00 EST.
Note that a future date in example 2 results in a negative value and therefore is under
2 hours. Input and Output panels are shown below. Notice the variation in DateTime masks
(formats).