导读:MYSQL 截取日期格式 年,月,日 select DATE_FORMAT(produceDate, %Y) as yeahr from historybarcodesort where DATE_FORMAT(produceDate, %Y)=2013 返回结果:2013...
MYSQL 截取日期格式年,月,日
select DATE_FORMAT(produceDate, '%Y') as yeahr from historybarcodesort where DATE_FORMAT(produceDate, '%Y')='2013'
返回结果:2013