Influxdb not accepting Json string time format

I’ve created the following inject node into node-red but its not liking the date, its says “Error: A 400 Bad Request error occurred: {“error”:“unable to parse ‘Equipment1,MachineType=Type1 pressure=5.5 1530722335.98’: bad timestamp”}”. If i remove the digits after decimal place for the timestamp the json updates the influx database. I want the time precision to be down to the millisecond. How can i get the to work?

[{“id”:“c7499d61.bc523”,“type”:“influxdb batch”,“z”:“7ec9d688.837b98”,“influxdb”:“1ecde249.cde93e”,“precision”:“ms”,“retentionPolicy”:"",“name”:"",“x”:960,“y”:940,“wires”:[]},{“id”:“efa3982f.b44e18”,“type”:“debug”,“z”:“7ec9d688.837b98”,“name”:"",“active”:true,“console”:“false”,“complete”:“payload”,“x”:932,“y”:1049,“wires”:[]},{“id”:“732f07b0.9be528”,“type”:“inject”,“z”:“7ec9d688.837b98”,“name”:"",“topic”:"",“payload”:"[{“measurement”:“Equipment1”,“tags”:{“MachineType”:“Type1”},“fields”:{“pressure”:5.5},“timestamp”:1530722335.98}]",“payloadType”:“json”,“repeat”:"",“crontab”:"",“once”:false,“x”:381,“y”:917,“wires”:[[“c7499d61.bc523”,“efa3982f.b44e18”]]},{“id”:“1ecde249.cde93e”,“type”:“influxdb”,“z”:"",“hostname”:“172.16.24.11”,“port”:“8086”,“protocol”:“http”,“database”:“TBGIOTDB”,“name”:“TBGIOTTimeSeriesDB”,“usetls”:false,“tls”:""}]

Thanks

I believe you can just multiply your timestamp by 1000 to get a 13-digit micro timestamp, which influxdb will recognize. But you may have to set the minimum resolution to match first…

Thanks, that worked a treat :slight_smile: