Coverting seconds into hr:min:sec

G

Guest

I woul like to find out how to convert seconds into hr:min:sec. For an
example I would like to take 3661 seconds and convert it into 1hr 1 min 1 sec.
 
P

Pete_UK

Assuming your seconds are in cell A1, use this formula in B1:

=A1/60/60/24

and use Format | Cells | Number tab | Time and choose a suitable
format. (or from Number tab choose Custom and [h]:mm:ss

Time is stored internally in Excel as a fraction of a 24 hour day, so
you need to divide by 60 to get minutes, divide again by 60 to get
hours, then divide by 24 - I find it easier to remember this way.

Hope this helps.

Pete
 
G

Guest

If A1 contains 3661 and B1 contains:
=A1/24/60/60 will display as: 0.042372685
if formatted as hh:mm:ss will display as: 01:01:01
 
G

Guest

Or, if you absolutely have to have the "hr", "min", "sec" text in the
results, you could use this formula....it is a bit long but works.
=INT(A1/3600)&"hr "&INT(((A1/3600)-INT(A1/3600))*60)&"min
"&ROUND(((((A1/3600)-INT(A1/3600))*60)-INT((((A1/3600)-INT(A1/3600))*60)))*60,2)&"sec"
Where A1 holds the number you wish to convert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top