At 16:23 -0700 8/17/02, Todd Schacherl wrote:
Hi Folks,
I have a MYSQL table with timeIn and a timeOut columns and I'm trying to
figure
out if I can calculate the difference within a SELECT statement. Both
fields are type TIME (e.g., 00:00:00).
What units do you want the result in? To get the difference in seconds,
use:
TIME_TO_SEC(timeOut) - TIME_TO_SEC(timeIn)
If you want the difference as a TIME, pass that result to SEC_TO_TIME().
Thanks,
One of the penalties for refusing to participate in politics is that you end
up being governed by your inferiors. -Plato