Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Timecalc.prg
Message
From
23/01/2002 18:19:11
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00609326
Message ID:
00609436
Views:
18
Hi Again,

Its working quite well. I am getting the difference between the time in seconds. If I read your reply right there is a easier way to turn seconds into hours and minutes? If so, could you point me in the right direction? Or is it just as easy to get hours, str(int(seconds/3600)) and concatenate that with minutes, STR(INT((seconds%3600)/60))?

Chris

>
>I think I understand what it's doing. As you know, 2 means to subtract one time from another. In the first example, subtracting the smaller from the larger, yields 10 hours 35 minutes. However, in the latter it appears to rely on absolute values to return the 10:25.
>
>I note that the code was written for a time before the Date/Time data type came into being. Subtracting one date/time from another returns the number of seconds. It's a lot easier and faster to convert seconds into days, hours and minutes, than the code shown there. Even if the time is being stored as a string converting it to a Date/Time value then doing the math, is probably a better solution.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform