温柔有尺,退让有度。善良不失棱角,温柔仍然有态度。
MySQL DATE_SUB
DATE_SUB(date,INTERVAL expr type)
date 参数是合法的日期表达式。expr 参数是您希望添加的时间间隔。
MySQL DATE_ADD
DATE_ADD(date,INTERVAL expr type)
select id,start_time from wangzi where start_time>DATE_SUB(now(),INTERVAL 60 MINUTE) ORDER BY start_time desc;
date_format 以不同的格式显示日期/时间数据
select * from student where DATE_FORMAT(birthday,'%Y-%m-%d')>'2020-04-10';