The first thing you have to understand is how you got *your* answer in the first place... This script works by calling it with an input value of the seconds you want to break down... Ex. gettime(12537);
<script>
function gettime(temp){
secs = temp%60;
mins = ((temp-secs)/60)%60;
hours = (((temp-secs)/60)-mins)/60;
document.write("Hours: " + hours + ", Minutes: " + mins + ", Seconds: " + secs);
}
</script>
I think the code is pretty much self-explanatory... 😉 May not be the most elegant, and I'm pretty sure there are other ways of doing this... but at 4 in the morning I'm not going to try to hard... 🙂