Use the SINCE... UNTIL clause on a time range in a query. If the UNTIL portion is omitted, the query matches all the events that occurred after the time specified in the SINCE portion. A query can contain both a SINCE... UNTIL clause and a WHERE clause. In such cases, WHERE argument comes before SINCE... UNTIL and is applied in that order. The time range specified in the clause overrides any other time limits applied to the query, including the time range selection in the UI.

If the SINCE... UNTIL clause is used in the series function, the time range specified in the clause will not override other time limits applied to the query. To set a time range for the query when the SINCE... UNTIL clause is used in the series function, use the time range selector in the UI.

Syntax

SINCE timevalue [UNTIL timevalue]

where timevalue is a combination of an integer and (optionally) a time unit. If timevalue is omitted the value is interpreted as a Unix epoch timestamp in milliseconds.

Unit Symbols
Description
[m | minute | minutes]minute
[h | hour | hours]hour
[d | day | days]day
[w | week | weeks]week (7 days)

Examples

Query
Result
SELECT * FROM transactions SINCE 1 h UNTIL 15 mAll transactions that occurred between 1 hour and 15 minutes ago
SELECT * FROM transactions SINCE 1 hAll transactions that occurred after one hour ago
SELECT * FROM transactions SINCE 1502147143000 UNTIL 1502148043000All transactions that occurred between the Unix timestamps 1502147143000 and 1502148043000