ES|QL RANGE_MAX function
Returns the end value of a date range.
range-
Date range expression. If
null, the function returnsnull.
Returns the maximum (end) value of a date_range. For a date_range [x, y), it returns y.
| range | result |
|---|---|
| date_range
|
date |
FROM decades
| WHERE decade == 1900
| EVAL max_bound = RANGE_MAX(date_range)
| KEEP date_range, max_bound
| date_range:date_range | max_bound:date |
|---|---|
| 1900-01-01..1910-01-01 | 1910-01-01T00:00:00.000Z |