between /2—determine whether one value is between two other  values


The between/2 operator determines whether one value is between two other  values.

$EXPR1 between $EXPR2

between/2 arguments

Argument

Type

Description

$EXPR1
ANY

Expression to the left of the operator

$EXPR2
LIST_OF ANY

Expression to the right of the operator

Use between/2 to determine whether the value of expression $EXPR1 is between the two values of $EXPR2.

The expression $EXPR2 must evaluate to a list of two values.

If $EXPR2 evaluates to [$VAL1,$VAL2], then the condition $EXPR1 between $EXPR2 is equivalent to: $VAL1 <= $EXPR1 AND $EXPR1 <= $VAL2.

between /2 example

$E.duration between [100,199]

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*