Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subtracting times
Message
From
30/10/2003 05:27:24
 
 
To
30/10/2003 04:59:37
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00844412
Message ID:
00844433
Views:
22
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform