ServerTime in Function Node formated for InfluxDB2 (RFC3339)


how can i format the ServerTime (Now) for InfluxDB2 ?

It needs the RFC3339 Format.

(new Date()).toISOString()

won´t work, i get an Error from InfluxDB Node "bad Timestamp"

Isnt InfluxDB timestamps in micro seconds unless you tell it otherwise?

Try using * 1000) instead of passing a string.

Did you try just passing the influx node the Date object?

Also, don't forget that if you are passing in the current time then you generally don't need to do that, influx will default to the current time.

Yes i just passed it, but before i used InlfuxDB 1.8, now it´s Version 2.5 with Flux language, and the Flux _time _start and _stop is more variable then before.

So i want to use my own Timestamp in a variable, not the one of InfluxDB

OK, I was just checking in case you were not aware of the options. I have not moved to Influx 2 yet.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.