In function of time using mysql

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)


Guess you like

Origin www.cnblogs.com/shuiqian/p/11126440.html