Mysql 时间操作(当天,昨天,7天,30天,半年,全年,季度)【备份】
admin_lnc 发布于 6年前 (2017-03-15)
1 、 查看当天日期 select current_date(); 2、 查看当天时间 select current_time(); 3、查看当天时间日期 select current_timestamp(); 4、查询当天记录 select * from 表名 where to_days(时间字段名) = to_days(now()); 5、查询昨天记录 SELECT * FROM 表名 WHERE ...
阅读(4285)评论(0)赞 (0)