# Influxdb not accepting Json string time format

**URL:** <https://discourse.nodered.org/t/influxdb-not-accepting-json-string-time-format/1323>\
**Category:** General\
**Created:** [4 July 2018 16:49 UTC](https://discourse.nodered.org/t/influxdb-not-accepting-json-string-time-format/1323 "2018-07-04T16:49:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kelster101757](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@kelster101757](https://discourse.nodered.org/u/kelster101757)\
**Post date:** [4 July 2018 16:50 UTC](https://discourse.nodered.org/t/influxdb-not-accepting-json-string-time-format/1323/1 "2018-07-04T16:50:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![shrickus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/shrickus/32/517_2.png) [@shrickus](https://discourse.nodered.org/u/shrickus)\
**Post date:** [4 July 2018 17:51 UTC](https://discourse.nodered.org/t/influxdb-not-accepting-json-string-time-format/1323/2 "2018-07-04T17:51:56Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![kelster101757](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@kelster101757](https://discourse.nodered.org/u/kelster101757)\
**Post date:** [24 July 2018 16:33 UTC](https://discourse.nodered.org/t/influxdb-not-accepting-json-string-time-format/1323/3 "2018-07-24T16:33:46Z")

</div>

Thanks, that worked a treat 🙂
