comparing dates by month and year in mysql

前端 未结 4 1947
醉话见心
醉话见心 2021-02-13 18:11

I have a table containing data about events and festivals with following columns recording their start and end dates.

  • Start_Date
  • End_Date

d

4条回答
  •  感情败类
    2021-02-13 18:34

    select * from your_table
    where year(Start_Date) = year(curdate())
    and month(Start_Date) = month(curdate())
    and end_date <= curdate() + interval 30 day
    

提交回复
热议问题