>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
This work for me:
CLEAR
m1 = DATETIME(2007,7,16,8,42,30)
m2 = DATETIME(2007,7,16,8,49,30)
? int(((m2-m1) % 3600)/60)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.