Check out DATE_SUB() and DATE_ADD() functions. Those are the one to do the trick.
sherzodR On Mon, 26 Nov 2001, Julio Faerman wrote: >Hi ! >I have a table with 2 coluns with time values , for example, colum START >("2001-11-20 23:34:03" , for example) and STOP ("2001-11-21 08:34:03" , for >example). >Given a interval of time, say 8 AM to 8 PM, i need my query to return the >total time between START and STOP outside this period. >Is this possible to be done with SQL ? >Thnx a lot ! >Julio > > > > >--------------------------------------------------------------------- >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 > --------------------------------------------------------------------- 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