Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formattinh seconds to hours

Status
Not open for further replies.

Fabioedl

Programmer
Feb 18, 2004
6
US
Hi all,

I need to format seconds to hours in Excel. For example, if I have 181 in the cell (181 seconds). How do I format it to show 00:03:01 ( 0 hours, 3 minutes and 1 second)

Thanks,

Fabioedl
 
Fabioedl,

TIME in excel is part of DATE which is DAYS. Date and Time are just numbers that relate to days. Time values are LESS THAN 1.

So you need to convert Seconds or Minutes or Hours to DAYS.

HrsPerDay =24
MinPerDay =HrsPerDay*60
SecPerDay =MinPerDay*60

For 181 sec
TIME: =181/SecPerDay

:)

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top