See this AppleScript: A routine to convert seconds to hh:mm:ss (hours:minutes:seconds).
For more information, see the wiki Searching the Forum for Answers section.