[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Date Manipulation.
HI !
First of all , thnx a lot for the attention.
The EXACT query i need is .
assume IN and OUT as date colums in the format "YYYY-MM-DD HH:MM:SS "
I need my query to return:
"How many seconds are there between IN and OUT but outside the period 8:00
to 20:00"
For example :
IN ="2001-10-20 02:30:00" OUT = "2001-10-20 04:00:00" should return 90
(mins)
IN ="2001-10-20 07:30:00" OUT = "2001-10-20 15:00:00" should return 30
(mins)
IN ="2001-10-20 23:30:00" OUT = "2001-10-21 00:30:00" should return 60
(mins)
IN ="2001-10-20 14:00:00" OUT = "2001-10-21 00:30:00" should return 270
(mins)
Did i made myself clear ? is it possible to be done with mysql ?
---------------------------------------------------------------------
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 <mysql-thread92365@xxxxxxxxxxxxxxx>
To unsubscribe, e-mail <mysql-unsubscribe-treed=ultraviolet.org@xxxxxxxxxxxxxxx>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
This mailing list archive is a service of Copilot Consulting.