Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subtracting times
Message
De
30/10/2003 05:27:24
 
 
À
30/10/2003 04:59:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00844412
Message ID:
00844433
Vues:
23
>Hi Neil,
>
>for you.
>
>Firsttime = '18:00:00'
>
>Chk1time = '18:03:45'
>? GetTimeDiff(Firsttime,Chk1time)
>
>PROCEDURE GetTimeDiff ( time1,time2 )
>PRIVATE diffTime
> diffTime = EVALUATE('{^1900/01/01 '+m.time2+'}')-EVALUATE('{^1900/01/01 '+m.time1+'}')
> RETURN PADL(INT(m.diffTime/3600),2,'0')+':'+PADL(INT(ABS(m.diffTime)/60)%60,2,'0')+':'+PADL(ABS(m.diffTime)%60,2,'0')
>ENDPROC
>
>
>Fabio

hi Fabio,

You can change the last line into
return ttoc({^1900/01/01 00:00:00} + diffTime,2)
There's a max of 12/24 hours dependent on set HOURS TO
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform