Skip to content

Time Range Expressions and Settings

Time range expressions let you manually configure the time range of dashboards and panels using a simple syntax instead of selecting fixed dates. This is useful when you want dynamic time windows that always stay relative to the current time.

  • Supported Units
    • s: Seconds
    • m: Minutes
    • h: Hour
    • d: Days
    • w: Weeks
    • M: Months
  • Supported Operators
    • /: Start of (day, month, week, etc.)
    • \: End of (day, month, week, etc.)
    • -: Subtract time
    • +: Add time
  • Keywords
    • now: Current time

Examples:

ExpressionFromTo
Last 5 minutesnow-5mnow
Yesterdaynow-1d/dnow-1d\d
The day so farnow/dnow
This weeknow/wnow\w

You can enter the From and To expressions in the time picker’s Start & End time fields. Click Apply to apply the custom range to the panel or dashboard.

image

Access panel-level time range settings by going to Panel Settings > Time Range in the right-side panel editor. These settings let you configure the time range independently for individual panels.

By default, all panels follow the dashboard’s global time range. Enabling Override dashboard time range lets an individual panel use its own time range, independent of the rest of the dashboard.

This is useful when you want to visualize and compare data across different time periods on the same dashboard, for example, comparing last month’s data alongside this month’s in separate panels.

image

Time Shift moves a panel’s start and end time forward or backward by a specified amount. This lets you view historical data offset from the current time range without changing the dashboard’s global range.

  • Supported operators: - (subtract time required)
  • Supported units: Same as Dashboard time range expressions

Examples:

FromToTime ShiftApplied FromApplied To
now-1dnow-5hnow-1d-5hnow-5h
now-1d/dnow-1d\d-1dnow-1d/d-1dnow-1d\d-1d

image