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:
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.
DateMath notation
An expression is formed from three parts:
An anchor date, either
nowor a date string ending with||.An operator:
+to add to the anchor,-to subtract from it, or/to round it.A time unit.
y
Year
Q
Quarter
M
Month
w
Week
d
Day
h
Hour
m
Minute
s
Second
ms
Millisecond
M is month and m is minute. The notation is case sensitive, so now-1M is a month ago and now-1m is a minute ago.
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/dcovers the whole of today, midnight to midnight.now/d - nowcovers today so far, midnight until this moment.
Examples
Taking now as 2025-01-01 12:00:00:
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
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
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
This week
now/w - now/w
This week so far
now/w - now
Previous week
now-1w/w - now-1w/w
Month
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
This quarter
now/Q - now/Q
This quarter so far
now/Q - now
Previous quarter
now-1Q/Q - now-1Q/Q
Year
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
Last updated
Was this helpful?