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 d9274b84047c96..23a1c25393e7f2 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 - - date_trunc - - ### 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 44cd68e6e466d2..d1ce23dac7c06c 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 - - date_trunc - - ### 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