Calculating the time between 2 datapoints

Hi experts,
is there a way to calculate the time between 2 data points in a measurement?
I want to monitor if sensors are regularly sending their data (via a RF-link, which is always less reliable than a wired connection).
Since I know at which intervals the sensors are supposed to send, I would know from the timing distance between 2 data points if I missed one (or more) transmissions.

In the best case I would write the calculated time between 2 datapoints in a new measurement.
I know that there are tasks that can be performed by something written in Flux. But since I don’t know Flux up to now and it doesn’t seem to be the future (yes, I know, there will be kind of a community plugin), I would like to prevent it. Is there another way to write calculated data back to the database?

Thanks
Christian

Are you currently using InfluxQL or SQL?

I’m using influxdb V2. As far as I know SQL is not possible with that version, I’m using InfluxQL.

OK. This is just a guess, but I do not think InfluxQL will allow you to calculate the time between 2 datapoints. I know it is possible with Flux and am pretty sure it’s possible with SQL. So you may have to either update to InfluxDB 3.0 or stay with v2 and change to Flux.

1 Like

If I followed the discussions correctly, this is what is currently annoying influxdb users.

I’m using (I have to) the OSS version. Therefore only V2 is available and SQL is not an option.
Since Flux is new to me (the same with SQL and InfluxQL) I would like to avoid learning it, since with V3 it might be still there, but it will not be the preferred query language and SQL will be available. I don’t want to make the effort to learn Flux.

But OK, thank you anyhow, at least I know that I don’t have to look for a way in InfluxQL.