(The village idiot is out again)
I'm wanting to create a "payload" of the date/time.
(Basically a log file name of meaning.)
This is the code I have:
I'm going to do other things with it, but this is the basic model.
The payload comes out with a space in it and that isn't exactly acceptable in file names.
(Or I haven't worked out how to do that.... yet.)
So I will replace the space with a
It isn't working.
var now = new Date().toLocaleString(); var res = now.replace(' ', '-'); //msg.payload = new Date().toLocaleString(); msg.payload = now; return msg;
This is what I get:
So, with what I know I'm trying.
Obviously I'm missing something.
Ok. Anyone - please.