-
Notifications
You must be signed in to change notification settings - Fork 398
[Doc] Update date related function documentation #2212
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
base: master
Are you sure you want to change the base?
Conversation
| ## Syntax | ||
|
|
||
| ### example | ||
| `TO_MONDAY(<date>)` |
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.
| `TO_MONDAY(<date>)` | |
| ```sql | |
| TO_MONDAY(<date>) | |
| ``` |
| ## Example | ||
|
|
||
| ```sql | ||
| SELECT TO_MONDAY('2020-1-1'),TO_MONDAY('2022-7-1 10:11:11'); |
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.
it is better to add case 1970-01-02
| ## Syntax | ||
|
|
||
| If there are no parameters, the current time is converted into a timestamp. | ||
| `UNIX_TIMESTAMP (<date>[, <fmt>])` |
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.
| `UNIX_TIMESTAMP (<date>[, <fmt>])` | |
| ```sql | |
| UNIX_TIMESTAMP (<date>[, <fmt>]) | |
| ``` |
| ## Syntax | ||
|
|
||
| |Mode |First day of week |Range |Week 1 is the first week … | | ||
| `WEEK(<date>[, <mode>])` |
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.
ditto
|
|
||
| ## Syntax | ||
|
|
||
| `WEEKOFYEAR (<date>)` |
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.
| `WEEKOFYEAR (<date>)` | |
| ```sql | |
| WEEKOFYEAR(<date>) | |
| ``` |
|
request review @morrySnow |
| ## Syntax | ||
|
|
||
| ```sql | ||
| WEEKOFYEAR (<date>) |
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.
需要类似 yearweek,写清楚计算 week 的逻辑是什么
|
|
||
| |Mode |First day of week |Range |Week 1 is the first week … | | ||
| ```sql | ||
| WEEK(<date>[, <mode>]) |
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.
是不是和 yearweek 是一个函数?如果是的话,保留一个,然后另外一个作为它的别名
Versions
Languages
Docs Checklist