Files
doris/docs/documentation/cn/sql-reference/sql-functions/date-time-functions/workofyear.md
2019-05-27 17:36:09 +08:00

398 B

weekofyear

Syntax

INT WEEKOFYEAR(DATETIME date)

Description

获得一年中的第几周

参数为Date或者Datetime类型

Examples

mysql> select weekofyear('2008-02-20 00:00:00');
+-----------------------------------+
| weekofyear('2008-02-20 00:00:00') |
+-----------------------------------+
|                                 8 |
+-----------------------------------+