-
Notifications
You must be signed in to change notification settings - Fork 256
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]date func #1856
base: master
Are you sure you want to change the base?
[doc]date func #1856
Conversation
|
||
Convert the date to the nearest rounding up time of the specified time interval period. | ||
`DATE_CEIL(DATETIME datetime, INTERVAL period type)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 参数不需要类型
- 参数需要用尖括号包裹
`DATE_CEIL(DATETIME datetime, INTERVAL period type)` | |
`DATE_CEIL(<datetime>, INTERVAL <period> <type>)` |
|
||
mysql [(none)]>select date_ceil("2023-07-13 22:28:18",interval 5 year); | ||
``` | ||
```sql |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
block 之间最好加个空行,防止渲染错误
| -- | -- | | ||
| `unit` | The unit to extract from the DATETIME. Possible values are year, month, day, hour, minute, second, or microsecond | | ||
| `from` | Fixed syntax | | ||
| `period` | The argument is a valid date expression | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
参数中没有 period
| Parameter | Description | | ||
| -- | -- | | ||
| `unit` | The unit to extract from the DATETIME. Possible values are year, month, day, hour, minute, second, or microsecond | | ||
| `from` | Fixed syntax | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
固定的token不用当做参数
Versions
Languages
Docs Checklist