Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datetime variation in HH:MM:SS
Message
From
07/09/2002 13:47:02
 
 
To
07/09/2002 13:21:14
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00697929
Message ID:
00697931
Views:
19
This message has been marked as the solution to the initial question of the thread.
>I am calculation the difference between those datetime values. I would like to obtain a result such as 03:34:33. I already have the integer fields that contains the number of seconds. How can I convert that to HH:MM:SS?


Michel,

One possiblility is (if # seconds < 86400)
? ttoc( { 00:00:00 } + abs(DateTimeValue1 - DateTimeValue2), 2)
another is (# seconds > 86400)
local s
s = abs(DateTimeValue1 - DateTimeValue2)
?transform( int(s/3600)*10000 + mod(int(s/60),60)*100 + mod(s,60), '99999:99:99')
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform