更具具体时间得到 2016-5-8日的数据 后面的 时分秒 不要 就查询那那一天的。
下面这些语句大概都行
select * FROM t_order where date(CreateTime) = '2016-05-18';
select * FROM t_order where year(CreateTime) = 2016 and month(CreateTime) = 5 AND DAY(CreateTime) = 18;
SELECT * FROm t_order WHERE CreateTime >= '2016-05-18 00:00:00' AND CreateTime <= '2016-05-18 23:59:59';
SELECT * FROM t_ORDER WHERE SUBSTRING(CreateTime,1,10) = '2016-05-18';
between and 2016-05-11 00:00:00 2016-05-11 23:59:59