Skip to content

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.


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)

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.

Subtract an amount from the current time:

now-<amount><unit>
ExpressionMeaning
nowThe current moment
now-5m5 minutes ago
now-1h1 hour ago
now-6h6 hours ago
now-24h24 hours ago
now-7d7 days ago
now-2w2 weeks ago
now-1M1 month ago
now-1y1 year ago

Unit reference:

UnitMeaning
sSeconds
mMinutes
hHours
dDays
wWeeks
MMonths
yYears

Truncate to the start of a period (UTC):

now/<period>
ExpressionMeaning
now/dStart of today (UTC midnight)
now/MStart of the current month
now/yStart of the current year

Subtract an amount and then truncate to the start of a period:

now-<amount><unit>/<period>
ExpressionMeaning
now-1d/dStart of yesterday
now-1M/MStart of the previous month
now-1y/yStart of the previous year

LabelFromTo
Last 5 minutesnow-5mnow
Last 15 minutesnow-15mnow
Last 1 hournow-1hnow
Last 6 hoursnow-6hnow
Last 24 hoursnow-24hnow
Last 7 daysnow-7dnow
Last 30 daysnow-30dnow
Last 90 daysnow-90dnow
Last 1 yearnow-1ynow
Todaynow/dnow
This monthnow/Mnow
This yearnow/ynow
Yesterdaynow-1d/dnow/d
Previous monthnow-1M/Mnow/M

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.