select between date and time mysql
Posted: Sun Mar 01, 2009 7:55 pm
hi to all
I have field date and time respectively. I want to select date between (date1 and time1 > 17) and (date2 < 17)
I tried in two ways but it doesn't work, please see code below.
any suggestions would greatly appreciated
tnx
tirso
I have field date and time respectively. I want to select date between (date1 and time1 > 17) and (date2 < 17)
I tried in two ways but it doesn't work, please see code below.
any suggestions would greatly appreciated
tnx
tirso
Code: Select all
SELECT * from purchases_suppliers WHERE (date_invoice >= '2009/02/25' and time_invoice > 17) AND (date_invoice <= '2009/02/27' AND time_invoice < 17)Code: Select all
SELECT * from purchases_suppliers WHERE date_invoice between ('2009/02/25' ANd time_invoice > 17) AND ('2009/02/27' AND time_invoice < 17 )