Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compare how much time passes between
Message
 
 
To
10/05/2002 11:51:14
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00655079
Message ID:
00655170
Views:
35
>thanx
>but its retuning something like this -63737 and i want a nicer format

As I sad, it's the number of seconds between two datetime values. Here's the sample code that would convert seconds into HHHH:MM:SS format
*FUCTION SecToTime
* Convert seconds to the Time string
PARAM nSeconds
LOCAL cHH, nTm, cMM, cSec, cTime, i
cHH = ALLT(STR(INT(nSeconds / 3600)))
nTm = nSeconds % 3600
cMM = PADL(INT(nTm / 60), 2, "0")
cSec = PADL(MOD(nTm, 60), 2, "0")
cTime = cHH + ":" + cMM + ":" + cSec
RETURN cTime
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform