命令计算年龄 <if test="query.startAge != null" >and <![CDATA[ timestampdiff(year, substring(u.idno, 7, 8), now()) >= startAge ]]></if>select timestampdiff(year, substring('110101199309228395', 7, 8), now());
SELECT DATE_FORMAT(NOW(),'%Y-%m-%d %H:%i:%s')MySQL 日期格式化