Skip to content

Commit

Permalink
[doc](fix) fix date trunc doc (#27317)
Browse files Browse the repository at this point in the history
  • Loading branch information
zy-kkk authored Nov 21, 2023
1 parent fcf7691 commit 402095b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,8 @@ under the License.

## date_trunc

<version since="1.2.0">

date_trunc

</version>

### Description
#### Syntax

Expand All @@ -42,8 +38,8 @@ Truncates datetime in the specified time unit.

datetime is a legal date expression.

unit is the time unit you want to truncate. The optional values are as follows: [`second`,`minute`,`hour`,`day`,`week`,`month`,`quarter`,`year`]
If unit does not meet the above optional values, the result will return NULL.
unit is the time unit you want to truncate. The optional values are as follows: [`second`,`minute`,`hour`,`day`,`week`,`month`,`quarter`,`year`].

### example

```
Expand Down Expand Up @@ -104,4 +100,5 @@ mysql> select date_trunc('2010-12-02 19:28:30', 'year');
+-------------------------------------------------+
```
### keywords
DATE_TRUNC,DATE,DATETIME

DATE_TRUNC,DATE,DATETIME
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,8 @@ under the License.

## date_trunc

<version since="1.2.0">

date_trunc

</version>

### description
#### Syntax

Expand All @@ -43,7 +39,7 @@ date_trunc
datetime 参数是合法的日期表达式。

unit 参数是您希望截断的时间间隔,可选的值如下:[`second`,`minute`,`hour`,`day`,`week`,`month`,`quarter`,`year`]
如果unit 不符合上述可选值,结果将返回NULL。

### example

```
Expand Down Expand Up @@ -106,4 +102,4 @@ mysql> select date_trunc('2010-12-02 19:28:30', 'year');

### keywords

DATE_TRUNC,DATE,TRUNC
DATE_TRUNC,DATE,TRUNC

0 comments on commit 402095b

Please sign in to comment.