Here is a bit of JavaScript in a function Node that will convert seconds (less than 1 days worth, ie 86400) into hh:mm:ss.
The upstream Node returns the seconds you want, the Nodes following this must be expecting a string.
In my case, the upstream Node was the result of an API call.
The downstream Node was a groov Data Store.
Here is what you are going to import;
I have put an inject node with a hard coded example of 2345 seconds.
You can see in the debug tab to the far right the output of 39 minutes and 5 seconds.
Here is the flow;
[{“id”:“e322e22c.55f208”,“type”:“function”,“z”:“c9ab873d.d3351”,“name”:“Convert seconds to hh:mm:ss”,“func”:"// Message from preceeding node is in seconds - should be less than 24 hours (86400 seconds).\nvar time = (new Date(msg.payload * 1000)).toUTCString().match(/(\d\d:\d\d:\d\d)/)[0];\n// Convert the ‘number’ (it now has two : in it) to a string by adding to an empty string.\nmsg.payload = time + ‘’;\n// Pass on the string to the next node, what ever that may be. (groov Data Store for example).\nreturn msg;\n\n",“outputs”:1,“noerr”:0,“x”:382,“y”:292,“wires”:[[“4e5060d3.7f8d”]]},{“id”:“4e5060d3.7f8d”,“type”:“debug”,“z”:“c9ab873d.d3351”,“name”:"",“active”:true,“console”:“false”,“complete”:“false”,“x”:637,“y”:292,“wires”:[]},{“id”:“8347e06b.333038”,“type”:“inject”,“z”:“c9ab873d.d3351”,“name”:“seconds”,“topic”:"",“payload”:“2345”,“payloadType”:“num”,“repeat”:"",“crontab”:"",“once”:false,“x”:150,“y”:292,“wires”:[[“e322e22c.55f208”]]}]