I want to query my records from today at 00.00
to now()
. The problem is that I want to do this dynamically so I need to manipulate the timestamp using now()
function.
Here is the query as an example.
SELECT SUM("something")
FROM "any_table_whatsoever"
WHERE time >= (now() - (now() % 86400) - (now() % 3600))
Here is the response.
error parsing query: found %, expected ) at line 3, char 29
It seems InfluxQL doesn't support modulo over timestamp. I also think that's I might treat it wrongs. For your information, I'm using InfluxQL on Grafana.
Are there any alternatives to achieve this?
EDIT: My Grafana panel must not relying on both $timeFilter
and $__interval
. I mean, like, displaying a stats "so far today". That wouldn't work if I relying on such variables since when we change the interval on Grafana, the query would affected.