Date language expressions for Activeboards and Widgets
Devo allows you to manually enter a time range in the indicator for both your entire Activeboard or individual widgets, giving you more flexibility and precision when searching your data. Simply click on the time range indicator in the top right and enter the desired dates or edit existing ones. The background of the time range indicator changes to red until a valid date is entered.
You can use a mix of both absolute and date language expressions in any given time range (for example, the to date can be relative and the from date absolute, and vice versa). For date language expressions, the current moment "now()" is used as the reference point.
Now look how this is reflected in a widget:
You can establish absolute dates in the required format:
|yyyy-MM-dd hh:mm:ss||Establishes the specified absolute date||2021-06-30 15:35:23|
With date language expressions, use a series of mathematical operations to move away from the current time which is used as the reference point. You can use multiple operators at once and the execution order is from left to right:
|Snap to (@) or |<||Rounds the date to the beginning of a time unit. Note that this operator only works with 1m, 1d, 1h, 1w, 1W, 1M and 1y.||now() @ 1m or now() |< 1m|
|Arithmetics (+/-)||Applies an offset to the date (date + offset or date - offset)||now() - 3h|
|Replace (^)||Replaces part of the date by a time unit (date ^ time_unit)||now() ^ 6d|
|Backward & forward (>>/<<)||Shifts the date to the next/past time unit (date >> time_unit or date << time_unit)||now() << 11M|
Let's suppose the current time (which we refer to as "now()") is Sunday, 05 February 2017, 13:37:05. The table below shows the resulting time when different expressions are applied. Not that this isn't an exhaustive list:
now() - 60m
60 minutes ago
Sunday, 05 February 2017, 12:37:05
now() @ 1h
Now (rounded to the beginning of the hour)
Sunday, 05 February 2017, 13:00:00
now() - 24h
24 hours ago
Saturday, 04 February 2017, 13:37:05
(now() - 1d) @ 1d
Yesterday (rounded to the beginning of the day)
Saturday, 04 February 2017, 00:00:00
(now() - 2d) @ 1d
2 days ago (rounded to the beginning of the day)
Friday, 03 February 2017, 00:00:00
(now() - 2d) @ 1m
2 days ago (rounded to the beginning of the minute)
Friday, 03 February 2017, 13:37:00
((now() - 2d) @ 1d) - 2h
2 days ago (rounded to the beginning of the day minus 2 hours)
Thursday, 02 February 2017, 22:00:00
now() @ 1w
Sunday, 05 February 2017, 00:00:00
now() @ 1W
Monday, 30 January 2017, 00:00:00
now() ^ 6d
Replace the day with 6
Monday, 06 February 2017, 13:37:05
now() ^ 2018y3M6d15h30m20s
Replaces the year with 2018
Tuesday, 06 March 2018, 15:30:20
now() >> 2M
Forward to next second month
Monday, 05 February 2018, 13:37:05
now() << 2M
Backward to previous second month
Friday, 05 February 2016, 13:37:05
now() >> 2M6d15h20m10s
Forward to next second month, sixth day, fifteenth hour, twentieth minute and 10 seconds
Tuesday, 06 February 2018, 15:20:10
|now() << 1h/1d||Goes back to the first hour of the current day. Minutes and seconds don't change.||Sunday, 05 February 2017, 01:37:05|
Let's take a look at the mathematical operators in action. Imagine that the current moment, which we always refer to as "now()" is Wednesday, 27 January 2021.
In this example, we want to show data from 70 days ago, rounded to the beginning of the day. To achieve this we enter "now() - 70d @1d" in the from field and "now()" in the to field.
In this example, we want to shift the current month back to June of the previous year and the current day with the first of the month. We want to shift our to date back to August. To achieve this we enter "now() <<6M1d" in the from field and "now() <<8M" in the to field.
Here we want to hone in further on the previous example. We want to shift our current moment to 22 June and subtract 5 hours. We want to shift our to date back to August and subtract 13 days. To achieve this we enter "(now() <<6M22d)-5h" in the from field and "(now() <<8M)-13d" in the to field.
Watch the following video to learn how to set time ranges in your Activeboards using time expressions of your own construction instead of selecting preset dates, as well as understand the basic notions on date language expressions.