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, > >Todd Schacherl >[EMAIL PROTECTED] > >One of the penalties for refusing to participate in politics is that you end >up being governed by your inferiors. -Plato --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php