Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to calulate duration of time
Message
De
25/05/1999 12:56:42
 
 
À
25/05/1999 12:43:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00222554
Message ID:
00222563
Vues:
23
>I want to calcualte a duration of time. Let's said i first click to a button then it will get the system time and store to a variable, later i click again the button and get the system time again.
>Now i want to calculate the time duration between the first and second click.
>Can i calculate it by :
>>>duration= time()-time()
>&&& first click time deduct second click time
>
>Any other good ways to get it ? i want to get the duration in total hours, minutes, seconds. each are separate !!!
>

Try the following:

tStartTime = DATETIME()
*Do something
nDuration = DATETIME()- tStartTime
cHoursMinsSecs = TTOC({^1999-01-01 0:0:0} + nDuration,2)
nNumDays = FLOOR(nDuration/86400)

>regard,
>chang
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform