Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to compute difference of 2 give time
Message
 
 
À
12/05/2004 03:58:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00903077
Message ID:
00903410
Vues:
27
This message has been marked as the solution to the initial question of the thread.
Evelyn,

If the time difference is less than 24 hours this works well
set hours to 24
ltStart = datetime()
ltFinish = ltStart + rand() * 80000
? ttoc( {^2001-01-01} + ( ltFinish - ltStart ), 2 )
If it's greater than 24 hours you can use a modulo 86400 arithmetic to get the number of days.

>is there any function in foxpro that let's me compute the difference between 2 time? like 12:30AM - 7:30AM = 5 hrs 0 mins.
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