mysql 查询 根据时分秒取数据 比如 取 时间为 8点半的 dateformat 时间函数转换
date_format(date,'%H') = 8 and date_format(date,'%i') = 30
SELECT * FROM `t_pda_trucklog` WHERE
DATE_FORMAT(operatetime,'%H') = 9 AND DATE_FORMAT(operatetime,'%i') = 42 AND DATE_FORMAT(operatetime,'%s') = 12
http://www.w3school.com.cn/sql/func_date_format.asp