Thank you Egor. These queries meet my needs.

Egor Egorov wrote:

>Veysel,
>Monday, October 14, 2002, 12:48:58 PM, you wrote:
>
>VHS> I am using mysql 3.23.52. I have to query one of my tables which has two 
>VHS> columns with the type of  "date" and "time". For example i have to get 
>VHS> the records whose date are 2002-10-12 and time is bigger than 11:30:00 
>VHS> and also the records whose date are 2002-10-13 and time is smaller than 
>VHS> 05:00:00. In other words i have to get a timeline between the 
>VHS> 2002-10-12/11:30:00 and 2002-10-13/05:00:00.
>
>SELECT * FROM table_name
> WHERE CONCAT(date,' ',time)>'2002-10-12 11:30:00'
> AND CONCAT(date,' ',time)<'2002-10-13 05:00:00';
>
>SELECT * FROM table_name WHERE (date > "2002-10-12" AND date < "2002-10-13") 
>     AND (time > "11:30:00" AND time < "05:00:00");
>
>
>
>  
>

-- 
Your favorite stores, helpful shopping tools and great gift ideas. 
Experience the convenience of buying online with Shop@Netscape! 
http://shopnow.netscape.com/



---------------------------------------------------------------------
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

Reply via email to