Hello.
Anyone help?
How can I convert a time input of HH:MM (ie:07:30) into seconds (since midnight)?
Cheers!
Hello.
Anyone help?
How can I convert a time input of HH:MM (ie:07:30) into seconds (since midnight)?
Cheers!
I'd recommend looking into node-red-contrib-moment (node) - Node-RED
Is that a string or what? If you don't know then feed it into a debug node and show us.
with change node and JSONata
$toMillis("1970-01-01T"&payload&":00.000")/1000
with function node
msg.payload = new Date("1970-01-01T"+msg.payload+":00.000").valueOf()/1000;
return msg;