Is there a way to add time interval to $__timeTo() in a query

  • What Grafana version and what operating system are you using?
    v7.5.5 centos
  • What are you trying to achieve?
    I need to execute a query in postgres and on click of a button execute it again with the toTime() increased by an interval

SELECT *
FROM v3
WHERE (time >= $__timeFrom() AND time <= $__timeTo() + ${interval})

  • How are you trying to achieve it?
    I added a variable ${interval} and tried using it in the query but postgres does not allow adding it to $__timeTo()

  • What happened?
    I get an error" pq: invalid input syntax for integer: ā€œ2019-07-20T13:00:22Zā€

  • What did you expect to happen?
    I expect the interval to be added to $__timeTo()

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    I get an error" pq: invalid input syntax for integer: ā€œ2019-07-20T13:00:22Zā€

Does Postgres support adddate() and addtime() or some equivalent, like MySQL
does?

https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html

Antony.