Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc](fix) fix date trunc doc #27320

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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