BETWEEN
<field_expr> [ NOT ] BETWEEN <field_expr> AND <field_expr>
The BETWEEN operator determines if a given field-expression belongs to a specified interval.
Examples
A. BETWEEN
The following example expression determines if the "Year" field belongs to the specified interval:Year BETWEEN 1999 AND 2004This example is equivalent to the following expression:Year >= 1999 AND Year <= 2004B. NOT BETWEEN
The following example expression determines if the "Year" field does not belong to the specified interval:Year NOT BETWEEN 1999 AND 2004This example is equivalent to the following expression:Year < 1999 OR Year > 2004C. TIMESTAMP interval
The following example query uses the FS Input Format to return all the files that have been created between 4 hours ago and 1 hour ago:SELECT Path FROM C:\MyDir\*.* WHERE TO_UTCTIME(CreationTime) BETWEEN SUB(SYSTEM_TIMESTAMP(), TIMESTAMP('4', 'h')) AND SUB(SYSTEM_TIMESTAMP(), TIMESTAMP('1', 'h'))
See also:
ExpressionsField-Expressions