quote
Check according to date
select * from fm_account_recharge where date_format(pay_finish_time, '%Y-%m-%d') = date_format('2018-02-24','%Y-%m-%d')
DATE_SUB(NOW() ,INTERVAL 5 MINUTE)
DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 5 MINUTE),'%Y-%m-%d %H:%M:%S')
Query this week's
dataselect * from data table where YEARWEEK(DATE_FORMAT (time field name,'%Y-%m-%d')) = YEARWEEK(NOW())
select * from data table where time field name BETWEEN '2016-02-01' AND '2016-02-05'
select * from data table where time field name BETWEEN DATE_SUB(NOW(),INTERVAL 3 MONTH) AND NOW()
http://blog.csdn.net/zhaitonghui/article/details/53080992