# between 运算符between operator

``````Table1 | where Num1 between (1 .. 10)
Table1 | where Time between (datetime(2017-01-01) .. datetime(2017-01-01))
``````

`between` 可以对任何数值、日期时间或时间跨度表达式执行运算。`between` can operate on any numeric, datetime, or timespan expression.

## 语法Syntax

T `|` `where` expr `between` `(`leftRange`..`rightRange`)`T `|` `where` expr `between` `(`leftRange`..`rightRange`)`

T `|` `where` expr `between` `(`leftRangeDateTime`..`rightRangeTimespan`)`T `|` `where` expr `between` `(`leftRangeDateTime`..`rightRangeTimespan`)`

## 参数Arguments

• T - 待匹配记录的表格输入。T - The tabular input whose records are to be matched.
• expr - 要筛选的表达式。expr - the expression to filter.
• leftRange - 左侧范围（含）的表达式。leftRange - expression of the left range (inclusive).
• rightRange - 右侧范围（含）的表达式。rightRange - expression of the right range (inclusive).

## 返回Returns

T 中谓词（expr >= leftRange 和 expr <= rightRange）的行的计算结果为 `true`Rows in T for which the predicate of ( expr >= leftRange and expr <= rightRange ) evaluates to `true`.

## 示例Examples

``````range x from 1 to 100 step 1
| where x between (50 .. 55)
``````
xx
5050
5151
5252
5353
5454
5555

``````StormEvents
| where StartTime between (datetime(2007-07-27) .. datetime(2007-07-30))
| count
``````

476476
``````StormEvents
| where StartTime between (datetime(2007-07-27) .. 3d)
| count
``````

476476