Hello. I am trying to sum values inside InfluxDB from Grafana using InfluxQL. I seem to have an issue with the time column. Using the following query in a table visual I get the expected time
SELECT sum("value")
FROM "weight"
WHERE ("tagName"::tag = 'Net_Weight_Head_2')
AND time >= now() - 1h
Hi Grant, good question, thanks for your help. I personally do not have access but can try work this out. I stream the values from a PLC to InfluxDB via OPCRouter. Is some kind of conversion automatically used when performing different types of queries as I have above? Makes sense if I am in a timezone +13hr UTC. I’ll run some more tests at
Yes, seems the data is being stored in UTC as querying for 13hr1min before will produce a result. 12hr59min before will not. Now I need a way to possibly have a variable that gets 4 timestamps to use inside of a query that change based on what time it is. 6am - 6pm. 6pm to 6am