Here is a little subflow I wrote to give you a time stamp.
There are 3 outputs.
1 - for use in log files so you can read it.
2 - the time is in msg.time
and can be used downstream by other nodes.
3 - used if you want to create file names with the date.
Just an offering.
[{"id":"5a81f3be.561bdc","type":"subflow","name":"Time Stamp","info":"**3 outputs. 1 - msg.payload holds the time. 2 - msg.time holds the time in a way to be used for reading time in a log file. 3 - outputs nsg.time in a format usable for file names**","category":"","in":[{"x":80,"y":100,"wires":[{"id":"682ac304.0590d4"}]}],"out":[{"x":640,"y":180,"wires":[{"id":"cf554e88.9fff18","port":0},{"id":"682ac304.0590d4","port":0}]},{"x":640,"y":230,"wires":[{"id":"682ac304.0590d4","port":0},{"id":"3db4df41.634848","port":0}]},{"x":640,"y":280,"wires":[{"id":"e4ca4227.3109c8","port":0},{"id":"682ac304.0590d4","port":0}]}],"env":[],"color":"#FF8888","outputLabels":["For use in log files","msg.time","For filename use"],"icon":"node-red/timer.svg"},{"id":"cf554e88.9fff18","type":"moment","z":"5a81f3be.561bdc","name":"","topic":"","input":"payload","inputType":"msg","inTz":"Australia/Sydney","adjAmount":0,"adjType":"days","adjDir":"add","format":"YYYY-MM-DD HH:mm:ss","locale":"en_AU","output":"payload","outputType":"msg","outTz":"Australia/Sydney","x":390,"y":180,"wires":[["e4ca4227.3109c8","c810aa73.a5706"]]},{"id":"e4ca4227.3109c8","type":"string","z":"5a81f3be.561bdc","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":":"},{"type":"str","value":""}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":440,"y":280,"wires":[[]]},{"id":"c810aa73.a5706","type":"change","z":"5a81f3be.561bdc","name":"TOPIC","rules":[{"t":"move","p":"payload","pt":"msg","to":"time","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":220,"y":230,"wires":[["3db4df41.634848"]]},{"id":"be4fd533.c9abb","type":"change","z":"5a81f3be.561bdc","name":"Save","rules":[{"t":"set","p":"payload","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":220,"y":140,"wires":[["c7ad4b3c.3a5368"]]},{"id":"3db4df41.634848","type":"change","z":"5a81f3be.561bdc","name":"Get","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":230,"wires":[[]]},{"id":"682ac304.0590d4","type":"switch","z":"5a81f3be.561bdc","name":"check topic","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"TIMESTAMP","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":200,"y":100,"wires":[[],["be4fd533.c9abb"]]},{"id":"c7ad4b3c.3a5368","type":"change","z":"5a81f3be.561bdc","name":"TimeStamp","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":180,"wires":[["cf554e88.9fff18"]]},{"id":"537c4cf1.68c114","type":"subflow:5a81f3be.561bdc","z":"e43e3902.57c4e8","name":"","x":770,"y":760,"wires":[["352be3cd.915574"],[],[]]}]