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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting from Seconds Into HH:MM:SS Format

Status
Not open for further replies.

ricardo1023

Programmer
Mar 23, 2008
54
US
I need to populate a column with the format hh:mm:ss. I received the input data for the column in seconds. For example if I have 368 seconds I need to populate the column with 00:06:08 Do you know how could I do this?

Thank you
 
It's important to understand how Microsoft applications deal with time, so read faq68-5827

To answer your question - Divide by the number of seconds in a minute, by the number of minutes in an hour, by the number of hours in a day.

368/60/60/24 = 368/86400 = 0.004259259. Formated as hh:mm:ss, this will display 00:06:08.

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 




faq68-5827

Convert SECONDS to DAYS...
[tt]
=A1/60/60/24
[/tt]
Format as TIME

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
For another variation
Code:
Format(TimeSerial(0,0,368),"hh:nn:ss")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top