mysql查询日期中的月份的方法:执行【SELECT * FROM BLOG WHERE MONTH(CREATETIME)=7;】语句即可。
获取月份
(推荐教程:mysql教程)
SELECT * FROM BLOG WHERE MONTH(CREATETIME)=7;
获取年份
SELECT * FROM BLOG WHERE YEAR(CREATETIME)=7;
mysql查询日期中的月份的方法:执行【SELECT * FROM BLOG WHERE MONTH(CREATETIME)=7;】语句即可。
获取月份
(推荐教程:mysql教程)
SELECT * FROM BLOG WHERE MONTH(CREATETIME)=7;
获取年份
SELECT * FROM BLOG WHERE YEAR(CREATETIME)=7;