8.2.1.8.3 Days
The Days condition compares difference in days between the associated field and the Comparison Date field with the number of days in the Days field, using an operator.
The specific settings, shown in Figure 146, for the Days Condition are as follows:
- Comparison date: A drop-down holding date and time fields, see Table 76.
- Operation: A logical operation, see Table 74.
- Days: An integer number of days, to be used in the logical expression when the condition is evaluated.
The calculation of days between the two dates is performed by subtracting the date in the associated fields from the comparison date, see Figure 147. This means that a positive result means the comparison date lies in the future, and a negative result means it lies in the past relative to the date on the name parameter.
The formula for the Days condition is written as: (Ds-Dc) [operator] Days
An example is of how the days condition is evaluated is given here.
The field associated with the condition is set to 31-12-2008, and is called YEAR_END_DATE.
The selected comparison date is the StartTime() (Ds) in this example set to 01-12-2008.
To check if the start time is during the year in question, the operation < (less than) is selected.
The number of days is set to 0.
This gives the expression: (StartTime() - YEAR_END_DATE) < 0
(20081201 - 20081231) < 0
-30 <= 0, and the condition is evaluated as true
| Comparison date | Description |
|---|---|
| CurrentTime() | Function that returns the current time for the current event. Current time should be used if time unit is used for calculations. If the time unit is not defined, this function returns the same time as the StartTime() function. |
| StartTime() | Function that returns the time when the current event occurred. |
| All associated fields in time or date format are visible in the drop-down list. |

