What do you mean? You want to go from a number in seconds to possibly “days hours:minute:seconds” format or the other way around?
If it’s seconds to string format:
echo gmdate("H:i:s", 685);
Check to me sure that the number isn’t bigger than 86,400
The gmdate() doc: http://us3.php.net/gmdate