morrySnow commented on code in PR #1821: URL: https://github.com/apache/doris-website/pull/1821#discussion_r1920156520
########## docs/sql-manual/sql-functions/scalar-functions/date-time-functions/makedate.md: ########## @@ -24,22 +24,42 @@ specific language governing permissions and limitations under the License. --> -## makedate -### Description -#### Syntax -`DATE MAKEDATE(INT year, INT dayofyear)` +## Description -Returns a date, given year and day-of-year values. dayofyear must be greater than 0 or the result is NULL. +Returns a date based on the specified year and the day of the year (dayofyear). -### example +Special cases: +- Returns NULL when `dayofyear` is less than or equal to 0. +- Automatically rolls over to the next year if `dayofyear` exceeds the number of days in the year. + +## Syntax + +```sql +MAKEDATE(<year>, <dayofyear>) Review Comment: 单词之间最好使用下划线分隔,以方便阅读 ```suggestion MAKEDATE(<year>, <day_of_year>) ``` ########## docs/sql-manual/sql-functions/scalar-functions/date-time-functions/hours-add.md: ########## @@ -24,27 +24,37 @@ specific language governing permissions and limitations under the License. --> -## hours_add -### description -#### Syntax +## Description -`DATETIME HOURS_ADD(DATETIME date, INT hours)` +Returns a new datetime value that is the result of adding a specified number of hours to the input datetime. -Add specified hours from date time or date +## Syntax -The parameter date can be DATETIME or DATE, and the return type is DATETIME. +```sql +HOURS_ADD(<date>, <hours>) +``` -### example +## Parameters -``` -mysql> select hours_add("2020-02-02 02:02:02", 1); -+-------------------------------------+ -| hours_add('2020-02-02 02:02:02', 1) | -+-------------------------------------+ -| 2020-02-02 03:02:02 | -+-------------------------------------+ -``` +| Parameter | Description | +|-----------|--------------------------------------------------| +| date | The input datetime value, which can be of type DATETIME or DATE | +| hours | The number of hours to add, of type INT | Review Comment: ```suggestion | `<date>` | The input datetime value, which can be of type DATETIME or DATE | | `<hours>` | The number of hours to add, of type INT | ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org