This is an automated email from the ASF dual-hosted git repository.
jiafengzheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new b536c18 [fix] fix wrong examples in week.md (#8397)
b536c18 is described below
commit b536c1850fc8e29a11130dd4743796eee261f7dc
Author: levy5307 <[email protected]>
AuthorDate: Tue Mar 8 21:26:43 2022 +0800
[fix] fix wrong examples in week.md (#8397)
fix wrong examples in week docment
---
.../sql-functions/date-time-functions/week.md | 36 +++++++++-------------
1 file changed, 14 insertions(+), 22 deletions(-)
diff --git a/docs/zh-CN/sql-reference/sql-functions/date-time-functions/week.md
b/docs/zh-CN/sql-reference/sql-functions/date-time-functions/week.md
index 23bebc6..14081a4 100644
--- a/docs/zh-CN/sql-reference/sql-functions/date-time-functions/week.md
+++ b/docs/zh-CN/sql-reference/sql-functions/date-time-functions/week.md
@@ -28,8 +28,8 @@ under the License.
## description
### Syntax
-`INT YEARWEEK(DATE date)`
-`INT YEARWEEK(DATE date, INT mode)`
+`INT WEEK(DATE date)`
+`INT WEEK(DATE date, INT mode)`
返回指定日期的星期数。mode的值默认为0。
参数mode的作用参见下面的表格:
@@ -48,28 +48,20 @@ under the License.
## example
```
-mysql> select yearweek('2021-1-1');
-+----------------------+
-| yearweek('2021-1-1') |
-+----------------------+
-| 202052 |
-+----------------------+
+mysql> select week('2020-1-1');
++------------------+
+| week('2020-1-1') |
++------------------+
+| 0 |
++------------------+
```
```
-mysql> select yearweek('2020-7-1');
-+----------------------+
-| yearweek('2020-7-1') |
-+----------------------+
-| 202026 |
-+----------------------+
-```
-```
-mysql> select yearweek('2024-12-30',1);
-+------------------------------------+
-| yearweek('2024-12-30 00:00:00', 1) |
-+------------------------------------+
-| 202501 |
-+------------------------------------+
+mysql> select week('2020-7-1',1);
++---------------------+
+| week('2020-7-1', 1) |
++---------------------+
+| 27 |
++---------------------+
```
## keyword
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]