Check If a Condition Is Ever True In the Time Period

The Interval Sometimes function returns true if and only if the attribute is ever true in the interval from the specified start date (inclusive) to the end date (exclusive). The syntax for this function is:

  • IntervalSometimes(<start date>,<end date>,<Boolean>)

For example, the Interval Sometimes function could be used to determine whether the client was in Australia at any time between 8 January 2007 and 22 January 2007 (inclusive). In Word you would write this rule as:

the client has been in Australia if

IntervalSometimes(2007-01-08,2007-01-23,the client was in Australia)

This function returns a value of true for 'the client has been in Australia' for the data shown in the following table.

Table 1. Inputs used in an IntervalSometimes rule
Date Input
01/01/2007 the client was in Australia = false
15/01/2007 the client was in Australia = true