Time range
Every dashboard has a time range that scopes all its widgets automatically. When you change the time range on a dashboard, every widget reruns its query against that window — without you having to touch any SQL.
How it works
Section titled “How it works”The time range is applied at the data layer, not in your widget SQL. The {table} reference in any widget query already points to a view pre-filtered by the selected from and to timestamps. This means:
- You do not need to add
WHERE timestamp >= ...filters in your widget queries - Changing the dashboard time range instantly refreshes all widgets
- Global filters are also applied at the same layer (see Filters)
Relative time expressions
Section titled “Relative time expressions”The time range picker accepts relative time expressions — strings that describe a point in time relative to now. These are the same expressions stored in time_settings.
Basic offset syntax
Section titled “Basic offset syntax”Subtract an amount from the current time:
now-<amount><unit>| Expression | Meaning |
|---|---|
now | The current moment |
now-5m | 5 minutes ago |
now-1h | 1 hour ago |
now-6h | 6 hours ago |
now-24h | 24 hours ago |
now-7d | 7 days ago |
now-2w | 2 weeks ago |
now-1M | 1 month ago |
now-1y | 1 year ago |
Unit reference:
| Unit | Meaning |
|---|---|
s | Seconds |
m | Minutes |
h | Hours |
d | Days |
w | Weeks |
M | Months |
y | Years |
Period truncation syntax
Section titled “Period truncation syntax”Truncate to the start of a period (UTC):
now/<period>| Expression | Meaning |
|---|---|
now/d | Start of today (UTC midnight) |
now/M | Start of the current month |
now/y | Start of the current year |
Combined: offset then truncate
Section titled “Combined: offset then truncate”Subtract an amount and then truncate to the start of a period:
now-<amount><unit>/<period>| Expression | Meaning |
|---|---|
now-1d/d | Start of yesterday |
now-1M/M | Start of the previous month |
now-1y/y | Start of the previous year |
Common time range presets
Section titled “Common time range presets”| Label | From | To |
|---|---|---|
| Last 5 minutes | now-5m | now |
| Last 15 minutes | now-15m | now |
| Last 1 hour | now-1h | now |
| Last 6 hours | now-6h | now |
| Last 24 hours | now-24h | now |
| Last 7 days | now-7d | now |
| Last 30 days | now-30d | now |
| Last 90 days | now-90d | now |
| Last 1 year | now-1y | now |
| Today | now/d | now |
| This month | now/M | now |
| This year | now/y | now |
| Yesterday | now-1d/d | now/d |
| Previous month | now-1M/M | now/M |
Widget-level time filters
Section titled “Widget-level time filters”Because the time range is injected automatically, you do not need WHERE timestamp >= ... in your widget SQL. The dashboard-level range already handles this.
If you need a widget to cover a fixed date range regardless of the dashboard picker, you can add an explicit WHERE timestamp filter in your query’s Filters field. That filter will be applied on top of the global time range — effectively narrowing it further. Widening beyond the selected range is not possible by design.