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')

相关文章:

  • 2022-12-23
  • 2021-12-05
  • 2021-12-18
  • 2021-07-25
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-28
  • 2021-08-06
  • 2021-08-28
  • 2022-12-23
相关资源
相似解决方案