Using a function of time: Time formatted using
DATE_FORMAT(td_CustInfo.inputDate,'%Y-%m-%d') inputDateShow
SELECT NOW(),CURDATE(),CURTIME()
select FK_CustID,yjfwrq from td_CustRecharge where productType in(2,3,4) and yjfwrq between now() and date_add(now(),interval 7 day) group by FK_CustID
- Date subtraction
SELECT DATE_SUB (now (), interval The Day. 7)
- Date addition
select date_add (now (), interval 7 day)