General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only