Operators

is between

Supported By

Syntax

expression is between expression and expression [[left|right] inclusive|exclusive]

Description

The is between operator compares the given value on the left to the two given values on the right. If the first given value falls between the second and third, the is between operator evaluates to true. Otherwise, the is between operator evaluates to false.

The inclusive, left-inclusive, right-inclusive, and exclusive options specify the is between operator's behavior when the first value is equal to the second or third. If the first value is equal to the second, is between will evaluate to true only if inclusive or left-inclusive is specified. If the first value is equal to the third, is between will evaluate to true only if inclusive or right-inclusive is specified. If none of these options is specified, inclusive is assumed to be the default.

If all given values are integers or numbers, the values will be compared numerically. If all given values are dates, the values will be compared chronologically. Otherwise, the values will be compared as strings.

Note

String comparison is case-insensitive. For case-sensitive comparison, use the csstrcmp function.

Synonym

between

See Also

<, <=, >, >=, not between, increasing, ascending, strcmp, csstrcmp