Select current months records mysql from timestamp column

前端 未结 10 2110
一整个雨季
一整个雨季 2020-12-05 15:31

I have a mysql DB that has a TIMESTAMP field titled date. How can I select all fields where the month is the current month?

Thanks in advance!

10条回答
  •  孤城傲影
    2020-12-05 15:58

    Use this query may this help you,

    Query = "SELECT * FROM  WHERE MONTH(date_entered) = MONTH(CURDATE())";
    

提交回复
热议问题