Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to calculate elapsed time
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01016916
Message ID:
01119600
Vues:
21
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform