Using Actuate BIRT Viewers : Functions and operators : BETWEEN( )
 
BETWEEN( )
Tests if a value is between two specified values.
Syntax
BETWEEN(value, upperBound, lowerBound)
Arguments
value
The value to test. The value can be a string, numeric, or date value.
upperBound
The first value in the range of values to which to compare. String and date values must be enclosed in double quotation marks (" ").
lowerBound
The second value in the range of values to which to compare. String and date values must be enclosed in double quotation marks (" ").
Returns
True if value is between upperBound and lowerBound, or equal to upperBound or lowerBound; returns false otherwise.
Examples
The following example tests each value in the SalesTotal data field to see if the value is between 10000 and 20000:
BETWEEN([SalesTotal], 10000, 20000)
The following example tests each value in the CustomerName data field to see if the value is between A and M:
BETWEEN([CustomerName], "A", "M")
The following example tests each value in the ReceiptDate data field to see if the value is between 10/01/07 and 12/31/07:
BETWEEN([ReceiptDate], "10/01/07 12:00 AM", "12/31/07 12:00 AM")
The following example uses BETWEEN( ) in conjunction with the IF( ) and ADD_DAY( ) functions to calculate a shipment date. If an orderDate value is in December 2007 (between 12/1/07 and 12/31/07), add 5 days to the orderDate value. If an orderDate value is in a month other than December, add 3 days to the orderDate value.
IF((BETWEEN([orderDate], "12/1/07 12:00 AM", "12/31/07 12:00 AM")), (ADD_DAY([orderDate], 5)), (ADD_DAY([orderDate], 3)))