mysql> select date_format(now(),'%Y'); +-------------------------+ | date_format(now(),'%Y') | +-------------------------+ | 2009 | +-------------------------+ 1 row in set (0.00 sec) 扩展: %Y:年 %c:月 %d:日 %H:小时 %i:分钟 %s:秒 mysql> select date_format(now(),'%Y-%c-%d %h:%i:%s'); +----------------------------------------+ | date_format(now(),'%Y-%c-%d %h:%i:%s') | +----------------------------------------+ | 2009-8-07 06:59:40 | +----------------------------------------+ 1 row in set (0.00 sec) ---