Mysql DateTime compare -
hi have table of following 2 records:
descript | start | end test 1 | 2011-07-18 14:30:00 | 2011-07-18 17:00:00 test 2 | 2011-07-18 00:00:00 | 2011-07-19 00:00:00
when tried select, can't seems retrieve 2nd result (test 2) seems dated 19th of july.
select * event start >= "2011-07-18 00:00:00" , end <= "2011-07-18 23:59:59";
would appreciate advise.
"2011-07-19 00:00:00" more "2011-07-18 23:59:59"
by condition should less, query not match test 2
.
your sql
query should be:
select * event start >= "2011-07-18 00:00:00" , end <= "2011-07-19 00:00:00";
Comments
Post a Comment