Closed 877dev closed 4 years ago
Setting up like this I get the date passed through but not the time for some reason...
Hi, thanks for raising. Often best to raise general questions in the Node-RED forum though as you tend to get a faster and possibly more complete response because lots of people will be looking at it.
In this case, if I've understood you correctly, you have two choices:
Use MomentJS's formatting. You can add text to the output format by escaping it with square brackets.
See here under "Escaping Characters" for details.
[today] dddd
Alternatively, add the timestamp to some field other than payload and then use a change node after the moment node to merge the timestamp with whatever other text you want.
Hi @TotallyInformation
Thank you, although that is also useful I don't think I explained myself clearly. The issue is that unless I use a timestamp trigger node, the time does not set and it shows 00:00. The date is correct.
I've posted over on node red as you suggested HERE
Many thanks 877dev
I seem to be missing something obvious. I have a true or false switch node, when "false" is outputted I want to set the payload message to "<time/date> Door is open".
As the input to the moment node is to be triggered by a "false" message from the switch node, I can't see how to get the time/date appended.
Any ideas?