Converting seconds to hh:mm:ss

G

Guest

Is there a function or formula to convert say 32,897 seconds to hh:mm:ss?

Thanks Chris
 
M

Max

With the time in seconds in A1,

Try: =A1/(60*60*24)

Format A1 as custom: [hh]:mm:ss
(to allow hours to roll over 24 hours)
 
B

Bob Phillips

Chris,

If the secs are in a1, create formula
=A1/(24*60*60)
in B1, and format it as time.
 
D

Dana DeLouis

If you forget the formula in the future, the Function is
=CONVERT(32897,"sec","day").

HTH
Dana DeLouis
 
G

Guest

Hi Dana,

This is giving me a #NAME? error. I believe it is occuring at the "sec" and
"day" arguments.
 
D

Dana DeLouis

Hello. Sound like you do not have the Analysis ToolPak add-in loaded. From
help on "Convert"...

"...if this function is not available, and returns the #NAME? error, install
and load the Analysis ToolPak add-in."

Do: Tools | Add-Ins... and select "Analysis ToolPak.

Using the formula that others gave you is probably better because you do not
have to load this. Just thought it might be something you would find
interesting.

Another technique that is sometimes neat is to add a range name with the
value of the formula =1/(60*60*24). Call the name something meaningfull.
Then you can do something like...

=32897*SecToDay

This way, down the road, you may forget what the following equation is
doing:
=32897 * 0.000011574074074074


Just a thought.
Dana DeLouis
 

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

Similar Threads


Top