You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The existing macros ($__toTime, $__fromTime, $__dateFilter()) are not always sufficient.
Examples:
If we use query caching, we cannot use the conversion of $__toTime and $__fromTime to a date type, as the cache will still treat these as different queries. Even if the date is the same, the different time components cause the cache to treat them as distinct queries, leading to cache misses. Date-only macros would be stable for the entire day.
For time series graphs, it's often desirable to display a line that connects to the last data point before the selected time range. This ensures the line on the graph doesn't start abruptly at the first point within the range. Using $__dateFilter() makes this difficult, as it filters out all data before $__fromTime.
These issues can be partially solved by adjusting the "Now delay" setting or by creating custom variables, but this is inconvenient or generates redundant queries.
It would be much more convenient to have $__fromDate and $__toDate macros available.
The specific format is flexible: a 'YYYY-MM-DD' string or toDate('YYYY-MM-DD') or the UnixTimestamp for the beginning of the day would all be excellent solutions.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
The existing macros ($__toTime, $__fromTime, $__dateFilter()) are not always sufficient.
Examples:
These issues can be partially solved by adjusting the "Now delay" setting or by creating custom variables, but this is inconvenient or generates redundant queries.
It would be much more convenient to have $__fromDate and $__toDate macros available.
The specific format is flexible: a 'YYYY-MM-DD' string or toDate('YYYY-MM-DD') or the UnixTimestamp for the beginning of the day would all be excellent solutions.
Beta Was this translation helpful? Give feedback.
All reactions