fabio-miranda/csv-to-influxdb

Epoch time error

Closed this issue · 1 comments

Hi Miranda,

I am not able to add unix epoch time in to influx, getting following error.

ValueError: time data '1616491233000000000' does not match format '%Y-%m-%d %H:%M:%S'

My CSV format

name,tags,time,command,crit,crit-fill,host,max,min,performanceLabel,service,unit,value,warn,warn-fill
metrics,,1616491233000000000,check_metrics,75,none,hostA,,0,pl,hostcheck,%,0,60,none
metrics,,1616491233000000000,check_metrics,5000,none,hostA,,0,rta,hostcheck,ms,0.092,3000,none

The time column needs to be in the format '%Y-%m-%d %H:%M:%S'. Here is an example: https://stackoverflow.com/a/15953715