Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Elapsed time calculation has a bug in it? What is wrong?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00612404
Message ID:
00612452
Vues:
21
Steve,

If the elapsed time is less than 24 hours, this is even easier than the other suggestions:
? left( ttoc( {^2002-01-01 00:00:00} + (datetime() - hospital.newdate), 2 ), 5 )
If it can span days then you can tweak it a little.

>Here's is my calculation for elapsed time. I subtract current time from start time to get elapsed time and show it as HH:MM in a listbox.
>
>Hours and minutes are off if
>Start Time is 09:50:00 and Current Time is 14:20:00. HH:MM is wrong.
>But if
>Start Time is 10:10:00 and Current Time is 14:20:00, HH:MM is right.
>
>Following is my code. What am I doing wrong? I am missing something. Thanks for your assistance. I am starting to spin my wheels on the back-half of the calculation. Thanks again.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform