This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 402095b85e9 [doc](fix) fix date trunc doc (#27317)
402095b85e9 is described below
commit 402095b85e9e41005f995fb1ff5929175725972d
Author: zy-kkk <[email protected]>
AuthorDate: Tue Nov 21 14:14:37 2023 +0800
[doc](fix) fix date trunc doc (#27317)
---
.../sql-functions/date-time-functions/date-trunc.md | 11 ++++-------
.../sql-functions/date-time-functions/date-trunc.md | 8 ++------
2 files changed, 6 insertions(+), 13 deletions(-)
diff --git
a/docs/en/docs/sql-manual/sql-functions/date-time-functions/date-trunc.md
b/docs/en/docs/sql-manual/sql-functions/date-time-functions/date-trunc.md
index d9274b84047..23a1c25393e 100644
--- a/docs/en/docs/sql-manual/sql-functions/date-time-functions/date-trunc.md
+++ b/docs/en/docs/sql-manual/sql-functions/date-time-functions/date-trunc.md
@@ -26,12 +26,8 @@ under the License.
## date_trunc
-<version since="1.2.0">
-
date_trunc
-</version>
-
### Description
#### Syntax
@@ -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
```
@@ -104,4 +100,5 @@ mysql> select date_trunc('2010-12-02 19:28:30', 'year');
+-------------------------------------------------+
```
### keywords
- DATE_TRUNC,DATE,DATETIME
+
+DATE_TRUNC,DATE,DATETIME
diff --git
a/docs/zh-CN/docs/sql-manual/sql-functions/date-time-functions/date-trunc.md
b/docs/zh-CN/docs/sql-manual/sql-functions/date-time-functions/date-trunc.md
index 44cd68e6e46..d1ce23dac7c 100644
--- a/docs/zh-CN/docs/sql-manual/sql-functions/date-time-functions/date-trunc.md
+++ b/docs/zh-CN/docs/sql-manual/sql-functions/date-time-functions/date-trunc.md
@@ -26,12 +26,8 @@ under the License.
## date_trunc
-<version since="1.2.0">
-
date_trunc
-</version>
-
### description
#### Syntax
@@ -43,7 +39,7 @@ date_trunc
datetime 参数是合法的日期表达式。
unit
参数是您希望截断的时间间隔,可选的值如下:[`second`,`minute`,`hour`,`day`,`week`,`month`,`quarter`,`year`]。
-如果unit 不符合上述可选值,结果将返回NULL。
+
### example
```
@@ -106,4 +102,4 @@ mysql> select date_trunc('2010-12-02 19:28:30', 'year');
### keywords
- DATE_TRUNC,DATE,TRUNC
+DATE_TRUNC,DATE,TRUNC
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]