# Node-red-contrib-influxdb function to pass a specific time query

**URL:** <https://discourse.nodered.org/t/node-red-contrib-influxdb-function-to-pass-a-specific-time-query/54414>\
**Category:** General\
**Tags:** database\
**Created:** [28 November 2021 19:18 UTC](https://discourse.nodered.org/t/node-red-contrib-influxdb-function-to-pass-a-specific-time-query/54414 "2021-11-28T19:18:37Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![adgardo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/adgardo/32/51725_2.png) [@adgardo](https://discourse.nodered.org/u/adgardo)\
**Post date:** [28 November 2021 21:39 UTC](https://discourse.nodered.org/t/node-red-contrib-influxdb-function-to-pass-a-specific-time-query/54414/3 "2021-11-28T21:39:23Z")

</div>

Hi Colin,

Thanks for your support! I do have configured the node as 1.x. However I changed the server before posting to avoid sharing my IP.  
The node "influxdb in" works fine. Just want to send the stationary query from a previous function.  
My problem is that I do not know how to prepare this query function. I tried with context variables, and following this post:

> [@Node-red-contrib-influxdb, select with absolute time range ERROR](https://discourse.nodered.org/t/node-red-contrib-influxdb-select-with-absolute-time-range-error/52981):
>
> Pls Help, I am trying to get data from a table in influx database with a query. Query is passed through influxDB in node. In the query I use WHERE condition with a variable absolute time range which can be manipulated. I get an error from influxDB: "Error from InfluxDB: invalid operation: time and \*influxql.VarRef are not compatible" Time format in the var. tstart and tend is: "2021-10-30T14:50:30.833Z"of (I also tried with number of msec.) The influxDB in node is set on msec. In the CLI …

Although I set a msg.query, my function always return the original message from its inject node (timestamp).

Thanks again for your time,

Cheers,

Adrián

---

_[View the full topic](https://discourse.nodered.org/t/node-red-contrib-influxdb-function-to-pass-a-specific-time-query/54414)._
