时间:2021-07-01 10:21:17 帮助过:21人阅读
二、查询当前时间包含年月日时分秒
SELECT NOW();
SELECT SYSDATE();
三、查询当天数据
SELECT t1.* FROM user1 t1 WHERE TO_DAYS(t1.`birthday`) = TO_DAYS(NOW()); SELECT * FROM user1 t1 WHERE t1.`birthday` BETWEEN DATE_FORMAT(NOW(), ‘%Y-%m-%d 00:00:00‘) AND NOW(); SELECT * FROM user1 t1 WHERE DATE(t1.`birthday`) = CURDATE();
MySQL获取对应时间
标签:hda div mys color 查询 code bsp rom curd