Send csv file to influxdb using node-red

I don't understand. Which is those is the value you are trying to convert?
Can you feed what you are trying to convert into a debug node and show a screenshot, I want to make sure I understand the type.
Also, if it looks like the text format you show, is that UTC or local time?

[{"id":"4b303c79.491094","type":"influxdb out","z":"1823091b.e8e7b7","influxdb":"e574e40a.01af78","name":"","measurement":"CLASS12","precision":"","retentionPolicy":"","x":1000,"y":240,"wires":[]},{"id":"e574e40a.01af78","type":"influxdb","z":"","hostname":"127.0.0.1","port":"8086","protocol":"http","database":"HOUSE","name":"DOp","usetls":false,"tls":""}]

my node outout is :

the influxdd is taking current time and not as per my csv:

but my csv date format is:

time	Ziehkraft_IST_LIN	Ziehkraft_IST_LIN_int	COIL_ID
			
15.08.2017 23:03:23.100000	771.572	77	1
15.08.2017 23:03:23.110000	721.65	77	2
15.08.2017 23:03:23.120000	775.572	77	3

I have edited your post so the images show (you had put them between the backticks).
Do you have any control of the timestamp format? It would be much easier if they were in a standard format, ISO for example.
Did you answer whether they are in UTC or local time?

Acctually I have no idea regarding this , but they are in UTC format

What do you mean? Do you mean you don't know if you can get them in a different format, or you know you have to use what is there?

the format which is shown in my csv , i ahve to change that into influxdb timestamp. I really do not know in which format is it currently.

If you cannot get the date in the csv file in a standard format then you will have to convert it in node red. I am not sure of the easiest way to do that, but one way is to write a function that extracts the year, month, day, hours, minutes, milliseconds and then uses the new Date() function to convert it to a date. Then you can use getTime to get a value for influx.
It would be much simpler if you could arrange for the csv file to include the date in a standard format.

1 Like

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