BETWEEN( ) Function

Example   See Also

Determines whether the value of an expression lies between the values of two other expressions of the same data type.

Syntax

BETWEEN(eTestValue, eLowValue, eHighValue)

Returns

Logical or null value

Arguments

eTestValue

Specifies the expression whose value BETWEEN( ) tests. If the value of eTestValue is greater than or equal to the value of eLowerValue and less than or equal to the value of eHighValue, BETWEEN( ) returns true (.T.). Otherwise, BETWEEN( ) returns false (.F.). BETWEEN( ) returns the null value if either eLowValue or eHighValue are the null value.

eLowValue

Specifies the lower value in the range BETWEEN( ) evaluates.

eHighValue

Specifies the upper value in the range BETWEEN( ) evaluates.

Remarks

BETWEEN( ) returns a value of true (.T.) if the value of a character, date, datetime, numeric, float, integer, double, or currency expression lies between the values of two other expressions of the same data type. If the value of the expression doesn't lie between the values of two other expressions, BETWEEN( ) returns false (.F.). BETWEEN( ) returns the null value if either eLowValue or eHighValue is the null value.