I have been trying for the last while to come up with a query that will do
the following:
Say I have table with these records:
StartDate StopDate
-------------------------------------------
2001-01-23 23:43:12 2001-01-24 04:29:12
2001-01-24 15:24:00 2001-01-26 01:15:02
2001-01-24 23:10:16 2001-01-24 23:15:59
2001-01-25 09:36:44 2001-01-27 12:11:41
The query to get the sum of all the seconds between the "StopDate" and
"StartDate" is easy. What I need to do is break that down into how many
seconds of that total were spent between midnight and 6am (and, conversely,
how many seconds of that total were spent between 6am and midnight). I know
the answer is probably very simple, but I have yet to figure it out.
Aaron Clausen
---------------------------------------------------------------------
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