Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to calculate elapsed time
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01016916
Message ID:
01119600
Views:
19
lnSeconds = 367
ltDt = {^2006/01/01 00:00:00} + lnSeconds
? SUBSTR(TTOC(ltDt,3),12)
* Including days
? STRTRAN(SUBSTR(TTOC(ltDt,3),9), "T", " ")
>I'm trying to figure out a simple algorithm to convert elapsed time to this format
>367 sec.
>00:06:07
>3607 sec.
>01:00:07
>
>e.g. convert lnSeconds to hh:mm:ss
>
>I have a quite complex code doing it, but I think it could be much simpler.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform