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:

Figure 146   Example of the Days Condition

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

Figure 147   Shows the Subtraction Performed by the Days Condition

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

Table 76    Content Description for the Comparison Date Setting

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.