I use influxdb 1.7.9-1 with some databases and some measurements. Now i want to select datapoints in a specific time range from a measurement with filters for fields and one filter for a tag. The timerange is from 2022-01-31T00:00:01.129322Z to 2022-01-31T23:59:54.693945Z
SELECT "test_field" FROM "test_measurement" WHERE ("tag_1" = '165' AND "tag_2" = 'State' AND "tag_3" = 'I' AND time >= '2022-01-31T00:00:00.0Z')
This query is giving me all datapoints between 2022-01-31T00:00:01.129322Z and 2022-01-31T23:59:54.693945Z
Now I want all datapoints between 2022-01-31T00:00:00.00Z and 2022-01-31T01:00:00.0Z
I try it like this:
SELECT "test_field" FROM "test_measurement" WHERE ("tag_1" = '165' AND "tag_2" = 'State' AND "tag_3" = 'I' AND time >= '2022-01-31T00:00:00.0Z' AND time <= '2022-01-31T01:00:00.0Z')
But this query doesn't work.
Is anybody out there who can tell me why?
Or is there another way to query a certain period of time from a database?
UPDATE 2022-03-22: I found something interesting.
I connected the InfluxDB with Grafana. At the picture below you can see my data with Timerange 2022-01-31 00:00:00 to 2022-02-22 00:00:00. This query also works at the CLI.
But then i changed the time range for one day in an suddendly i have no data. Timerange 2022-01-31 00:00:00 to 2022-02-22 00:00:00. Grafana gives me no query, but i changed the time range from query before but there a no datapoints in the CLI.
Is there any setting which i can change in Grafana or InfluxDB that i can see my data in a closer timerange?