createdate=时间字段

1、本周
and  year(e.createdate)=year(NOW()) and  YEARWEEK( date_format(  e.CREATEDATE,'%Y-%m-%d' ) ) = YEARWEEK( now() )
2、本月
and  year(e.createdate)=year(NOW()) AND DATE_FORMAT(e.CREATEDATE, '%Y-%m') = DATE_FORMAT(NOW(),'%Y-%m')

3、本季度
and year(e.createdate)=year(NOW()) AND quarter(e.CREATEDATE) = quarter(NOW())

4、本年
and  year(e.createdate)=year(NOW())

 

相关文章:

  • 2021-09-29
  • 2021-12-05
  • 2021-12-12
  • 2022-12-23
  • 2022-01-27
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案