No Data when using where time range with specific date time or less than

Hi,

I’m having a problem I’ve never had before:
If I query
select * from measurement or
select * from measurement where time > now() - 2d or
select * from measurement where time >= ‘2020-09-27T00:00:00Z’*
I get the correct records

For example:

But, if I use the following queries I get no results (and I should):
select * from measurement where time <= ‘2020-09-27T03:00:00Z’ or
select * from measurement where time >= ‘2020-09-27T00:00:00Z’ and time <= ‘2020-09-27T20:00:00Z’

For instance if I use grafana and I use the now() - 24h I get the data, but if I zoom in or I specify time range from the past I get not data. I only get data back if the last point in the series is included in the query.

Can someone please help me!

  • The data with the issues has datapoints every 30-60 minutes
  • Influx 1.0.2
  • In the same database I have other measurements that don’t behave like this

Thank you!

Hello @agomez,

I’m not sure what the problem is. Can you please try upgrading your InfluxDB version? 1.0 is quite old. Then can you let me know if this problem still persists?

Thank you :slight_smile:

Thank you very much!

We’re doing the update; however, this wasn’t the issue.

I’m using python sdk to write data. It seems like the data contains some null values that were being passed as ‘’. I changed that to pass these values as None and now everything works well with this measurement.

Thank you for your help!

1 Like