format date
Date formatting. Line output as 29 Aug 2021 06:15:36
[{"id":"05784e1d0c884d6b","type":"function","z":"c991dbcde03824f2","name":"Format date","func":"const dateNow = {'payload': formatDate()}\n\nfunction formatDate(){\n//29 Aug 2021 06:15:36\n let date = new Date();\n let year = new Intl.DateTimeFormat('en', { year: 'numeric' }).format(date);\n let month = new Intl.DateTimeFormat('en', { month: 'short' }).format(date);\n let day = new Intl.DateTimeFormat('en', { day: '2-digit' }).format(date);\n let time = date.toLocaleTimeString('en-US', { hour12: false });\n return `${day} ${month} ${year} ${time}`;\n}\n\nreturn dateNow","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":280,"y":330,"wires":[["be5410139829f1e3"]]},{"id":"5d65b0583e8c1f67","type":"inject","z":"c991dbcde03824f2","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":138,"y":330,"wires":[["05784e1d0c884d6b"]]},{"id":"be5410139829f1e3","type":"debug","z":"c991dbcde03824f2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":442,"y":330,"wires":[]}]