For the complete documentation index, see llms.txt. This page is also available as Markdown.

Time Range Selector

Absolute, relative, and predefined time ranges, and the DateMath notation behind them.

The Time Range Selector appears wherever akenza shows data over a period, from a dashboard to a device's message history. It supports three ways of setting the range:

Way
What it is
Use it when

Date range

An absolute start and end.

You are looking at a fixed period, such as a particular week of an incident.

Relative selection

An expression in DateMath notation, evaluated whenever the view is opened.

The range should follow the present, such as "the last 24 hours".

Quick selection

A predefined relative range chosen from a list.

One of the common ranges already fits, which is most of the time.

A relative range matters most on anything left open or shared. A dashboard on a signage screen, or one reached through a public link, keeps showing the right window because the expression is evaluated each time rather than baked in.

Rounding happens in the workspace time zone, not the viewer's, so now/d is the start of the day as the workspace defines it. See General Settings for where that is set.

DateMath notation

An expression is formed from three parts:

  1. An anchor date, either now or a date string ending with ||.

  2. An operator: + to add to the anchor, - to subtract from it, or / to round it.

  3. A time unit.

Unit
Meaning

y

Year

Q

Quarter

M

Month

w

Week

d

Day

h

Hour

m

Minute

s

Second

ms

Millisecond

Rounding

/ rounds the date to the boundary of the given unit. At the start of a range it rounds down, to the beginning of that unit; at the end of a range it rounds up, to the end of it.

That is what distinguishes a whole period from a period in progress:

  • now/d - now/d covers the whole of today, midnight to midnight.

  • now/d - now covers today so far, midnight until this moment.

Examples

Taking now as 2025-01-01 12:00:00:

Expression
Reads as
Result

now+1d

now plus one day

2025-01-02 12:00:00

now-1m

now minus one minute

2025-01-01 11:59:00

now-1s/h

now minus one second, rounded to hours

2025-01-01 11:00:00

2025.01.01||+1M/d

2025.01.01 plus one month, rounded to days

2025-02-01 00:00:00

The third example is worth reading twice: subtracting one second crosses back into the previous hour, and the rounding then takes it to the start of that hour rather than the one now is in.

Predefined relative time ranges

The quick selection offers these ranges. The expressions are shown so that you can start from one and adapt it in a relative selection.

Hour

Range
Expression

This hour

now/h - now/h

This hour so far

now/h - now

Last hour

now-1h/h - now-1h/h

Last 1h

now-1h - now

Last 12h

now-12h - now

Last 24h

now-24h - now

Last 48h

now-48h - now

Day

Range
Expression

Today

now/d - now/d

Today so far

now/d - now

Yesterday

now-1d/d - now-1d/d

This day last week

now-7d/d - now-7d/d

Last 7 days

now-7d - now

Last 30 days

now-30d - now

Last 90 days

now-90d - now

Week

Range
Expression

This week

now/w - now/w

This week so far

now/w - now

Previous week

now-1w/w - now-1w/w

Month

Range
Expression

This month

now/M - now/M

This month so far

now/M - now

Previous month

now-1M/M - now-1M/M

Last 6 months

now-6M - now

Quarter

Range
Expression

This quarter

now/Q - now/Q

This quarter so far

now/Q - now

Previous quarter

now-1Q/Q - now-1Q/Q

Year

Range
Expression

This year

now/y - now/y

This year so far

now/y - now

Previous year

now-1y/y - now-1y/y

Last 1 year

now-1y - now

Note the difference between the two families. Last 24h is a rolling window ending now, while Yesterday is a fixed calendar day. Comparing one period against another is only meaningful with the rounded forms, since a rolling window starts at a different point every time it is evaluated.

Last updated

Was this helpful?