Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to calculate elapsed time
Message
De
25/05/2005 14:16:13
 
 
À
25/05/2005 03:15:59
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01016916
Message ID:
01017605
Vues:
18
>Fred,
>Hope you wouldn't mind, a little shortening (and then making it longer for independency to time formats):
>
>ttoc(ctot('0') + nSeconds,2) && also works as a shorter notation - VFP uses base date

Shorter is *usually* better and in this case it is.

>However this depends on time format settings and is only effective if elapsed time is not more than 24 hours. My suggestion is to use a longer independant way:
>
>
lcHoursMins = ltrim(str(int(m.nSeconds/3600))) + ':'+ltrim(str(m.nSeconds%3600/60))
Cetin

Of course if the difference is greater than 24 hours, you would need some sort of custom format. Yours is as good as any.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform