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

Seconds to H:MM:SS format

Status
Not open for further replies.
Apr 28, 2003
38
0
0
US
I currently have a variable that gives me the total number of seconds between two dates, but I cannot find a function to convert the total number of seconds into the format H:MM:SS

I searched the posted and did not find anything out there. If anyone has any suggestions I would be greatful.


Thanks,
Mike Soll
 
One trick:
Code:
formatDateTime( numberOfSeconds/86400, vbLongTime )


------
heisenbug: A bug that disappears or alters its behavior when one attempts to probe or isolate it
schroedinbug: A bug that doesn't appear until someone reads source code and realizes it never should have worked, at which point the program promptly stops working for everybody until fixed.

[ba
 
here is an adoptation to vongrunt's method

Code:
<%
hhmmss=formatDateTime( numberofseconds/86400,vbLongTime)
response.Write left(hhmmss,len(hhmmss)-3)
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top