0


Hello, people.

Is there a way to add days to an InfluxDB query, like we do in MySQL?

Something like this:

SELECT time + 1d, last(field) AS point FROM measurement

We can use time literals in the WHERE clause, but can we use them on the SELECT one?

Thanks.

Félix Daniel
  • 21
  • 1
  • 7
  • Not possible, as far as I know. Math operations also not supported on `time`. If you are doing something with timezones perhaps this could be helpful https://docs.influxdata.com/influxdb/v1.7/query_language/data_exploration/#the-time-zone-clause – Nikolay Hüttenberend Mar 02 '20 at 15:29
  • No, not exactly, but thanks for the tip! – Félix Daniel Sep 04 '20 at 21:09

1 Answers1

0

My workaround for this problem is to insert a separate (redundant) epoch seconds integer field into my measurement.