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

seconds to HHHH:MM:S

Status
Not open for further replies.

vincer

Programmer
Mar 12, 2002
45
GB
Hello,
is there a simple way of converting a number of seconds to
it's HHHH:MM:SS equivalent without using a formula? [ponder]

thanks
Vince
 
You are going to need a "formula" even if there is a simple function to do the job :)

WhilePrintingRecords
numbervar theHours;
numbervar theMins;
numbervar theSecs;

theSecs := Remainder ({Table.fieldSecs},60);
theMins := Remainder(truncate({Table.fieldSecs}/60),60);
theHours := truncate(truncate({Table.fieldSecs}/60)/60);

totext(theHours,"####") + ":" + totext(theMins,"00") + ":" + totext(theSecs,"00");

this will do the job.

JimBroadbent@Hotmail.com
 
Check under additional functions. There are a few
choices for display and format of hhmmss.
uflssm.dll is what you should check to be sure it
is installed on your machine. If not you can download
from Crystal Decisions website.
Once installed all you need to do is select the
format you like.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top