How to query to get data for daily time (today) in Influxql

#1

I’m working on a project to create an API, where one of the endpoints I want to display in the API I create is about daily data. Data displayed from today’s date from 00.00 - 23.59.59 (same as today data displayed at grafana).

How to query to retrieve the data?

Regards,
SY

#2

At the moment we don’t have a helper on influxql to get that limits. You should figure out it by yourself in the api handler.

The end query should look like

SELECT * FROM where_they_are WHERE time > {startTime} AND time < {endTime}

Where startTime and endTime are calculated by your languages.

1 Like
#3

Ok thank you for your advice and help @gianarb