Skip to content

Commit 1fae328

Browse files
authored
ESQL docs: clarify duration aliases (minute vs month), case-insensitive & optional whitespace
Relates: #135552
1 parent c24d431 commit 1fae328

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

docs/reference/query-languages/esql/esql-time-spans.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,30 @@ POST /_query
110110
```
111111

112112

113+
### Duration units and matching rules
114+
115+
Duration literals can be written with or without a space between the number and the unit
116+
(for example, `1m` is equivalent to `1 m`). Matching is **case-insensitive**.
117+
113118
## Supported temporal units [esql-time-spans-table]
114119

115120
| Temporal Units | Valid Abbreviations |
116121
| --- | --- |
117122
| year | y, yr, years |
118123
| quarter | q, quarters |
119-
| month | mo, months |
124+
| month | m, mm, month, months |
120125
| week | w, weeks |
121126
| day | d, days |
122127
| hour | h, hours |
123-
| minute | min, minutes |
128+
| minute | min, mi, n, minute, minutes |
124129
| second | s, sec, seconds |
125130
| millisecond | ms, milliseconds |
126131

132+
**Examples**
133+
134+
```esql
135+
FROM t | WHERE date_col > NOW() - 1m // month (same as: 1 m)
136+
FROM t | WHERE ts > NOW() - 1mi // minute
137+
FROM t | WHERE ts > NOW() - 1n // minute
138+
FROM t | WHERE ts > NOW() - 500ms // millisecond
139+
```

0 commit comments

Comments
 (0)