PHP开发教程

MySQL dayofweek()函数

DAYOFWEEK(date)

返回日期星期索引 (1 = Sunday, 2 = Monday, ., 7 = Saturday). 这些索引值对应于ODBC标准。

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


Powered by PHP二次开发 ©2008-2017