A good, flexible way do that is to add a function node right before the file node, and use the date library in JavaScript to get whatever date/time formatted string that you want, then append that string to the payload before it's written to the file node. That way you can also modify the string as need -- for example to make it into CSV format. I refer to this page when working with JavaScript dates and timestamps in Node-RED: www.w3schools.com/jsref/jsref_obj_date.asp
Another good tutorial, thanks.
My pleasure!
Great video. How can we output this text file to a Dashboard graph node?
Great video . i need help please can you help me how to do data classification for diagnosis of patients using red nod ?
How to get the hour that the temperature change?
A good, flexible way do that is to add a function node right before the file node, and use the date library in JavaScript to get whatever date/time formatted string that you want, then append that string to the payload before it's written to the file node. That way you can also modify the string as need -- for example to make it into CSV format.
I refer to this page when working with JavaScript dates and timestamps in Node-RED: www.w3schools.com/jsref/jsref_obj_date.asp