Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datetime() Elapsed Time function
Message
 
 
To
19/07/2007 17:22:52
Dick Day
Madison County, Nebraska
Nebraska, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01242178
Message ID:
01242181
Views:
18
>In Marcia's 1001 Things book, she lists a handy utility for calculating elapsed time by using the total seconds.
>
>function getminutes
>return int((elapsed_seconds % 3600)/60)
>
>I just now noticed that there is a problem with the way it is returning some values back to the calling program.
>
>Using 07/16/2007 08:42:30 as the start time and 07/16/2007 08:49:30 as the ending time, it returns 6 minutes, rather than 7. The days,hours & second functions seem to work just fine.
>
>Any suggestions? Thoughts?
>
>Thanks,
>
>Dick


See http://www.berezniker.com/display/VFP/Converting+duration+in+seconds+to+time+format
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform