Converting Seconds to H:M:S

Take a look at this and see if you can pick up some ideas: