SELECT
*
FROM
t_violation_info
WHERE
(
DATE(UPDATED_TIME) = CURDATE()
AND HOUR (UPDATED_TIME) < 16
)
OR (
DATE(UPDATED_TIME) = DATE_SUB(CURDATE(), INTERVAL 1 DAY)
AND HOUR (UPDATED_TIME) >= 16
)
2022-03-25 00:14:27
SELECT
*
FROM
t_violation_info
WHERE
(
DATE(UPDATED_TIME) = CURDATE()
AND HOUR (UPDATED_TIME) < 16
)
OR (
DATE(UPDATED_TIME) = DATE_SUB(CURDATE(), INTERVAL 1 DAY)
AND HOUR (UPDATED_TIME) >= 16
)