Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Datetime() Elapsed Time function
Message
 
 
À
19/07/2007 17:22:52
Dick Day
Madison County, Nebraska
Nebraska, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01242178
Message ID:
01242189
Vues:
22
This message has been marked as the solution to the initial question of the thread.
I'm getting 7 minutes not 6 for those dates. You may hit problem described in PRB: DateTime Subtraction May Not Produce an Exact Integer mskb #258998. Try to add rounding to fix the problem
function getminutes(elapsed_seconds)
return int((ROUND(elapsed_seconds,0) % 3600)/60)
>In Marcia's 1001 Things book, she lists a handy utility for calculating elapsed time by using the total seconds.
>function getminutes(elapsed_seconds)
>return int((elapsed_seconds % 3600)/60)
>I just now noticed that there is a problem with the way it is returning some values back to the calling program.
>
>Using 07/16/2007 08:42:30 as the start time and 07/16/2007 08:49:30 as the ending time, it returns 6 minutes, rather than 7. The days,hours & second functions seem to work just fine.
>
>Any suggestions? Thoughts?
>
>Thanks,
>
>Dick
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform