Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subtracting times
Message
From
30/10/2003 08:57:16
 
 
To
30/10/2003 08:36:55
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00844412
Message ID:
00844478
Views:
22
>Using CTOT() function
>
>Firsttime = '18:00:00'
>
>Chk1time = '08:03:45'
>
>? GetTimeDiff(Firsttime,Chk1time)
>
>PROCEDURE GetTimeDiff ( time1,time2 )
>
>RETURN STUFF(STUFF(RIGHT(TTOC({^1900/01/01 00:00} + (CTOT(m.time2)-CTOT(m.time1))%86400,1),6),5,0,':'),3,0,':')
>
>ENDPROC
>
>
>Fabio

Hi Fabio,

You can shorten it a bit
return TTOC(ctot('00:00:00') + (CTOT(m.time2)-CTOT(m.time1))%86400,2)
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform