PHP开发教程

MySQL year()函数

YEAR(date)

返回日期的年份,范围为1000〜9999,或者0日期。

mysql> SELECT YEAR('98-02-03');
+---------------------------------------------------------+
| YEAR('98-02-03')                                        |
+---------------------------------------------------------+
| 1998                                                    |
+---------------------------------------------------------+
1 row in set (0.00 sec)


Powered by PHP二次开发 ©2008-2017