SELECT * FROM table_name WHERE to_days(createtime) = to_days(now());
SELECT * FROM table_name WHERE YEARWEEK(date_format(createtime,'%Y-%m-%d')- INTERVAL 1 DAY) = YEARWEEK(now());
SELECT * FROM table_name WHERE date_format(createtime,'%Y-%m')=date_format(now(),'%Y-%m')