- 方法一
SELECT *
FROM TB_CONSUME_TRADE_UD
WHERE
DATE_FORMAT(STR_TO_DATE(TRADE_TIME,"%Y%m%d%H%i%s"), '%H%i%s') BETWEEN "070000" AND "1930000"
AND TRADE_TIME BETWEEN "20190618000000" AND "20190619000000"
- 方法二
SELECT *
FROM TB_CONSUME_TRADE_UD
WHERE TRADE_TIME BETWEEN "20190618070000" AND "20190618193000"