-
Notifications
You must be signed in to change notification settings - Fork 298
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
fix the document of TO_DATE, TO_DAYS, year_floor, WEEKS_ADD, WEEKS_DIFF, WEEKS_SUB function #2197
base: master
Are you sure you want to change the base?
Conversation
## Required parameter | ||
**datetime_value**: datetime type datetime |
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.
function doc's parameter should put into a table.
|
||
The difference between the start time and the end time is weeks | ||
```sql | ||
WEEKS_DIFF([<end_date> | <end_datetime>], [<start_date> | <start_datetime>]) |
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.
WEEKS_DIFF([<end_date> | <end_datetime>], [<start_date> | <start_datetime>]) | |
WEEKS_DIFF(<end_date> <start_date>) |
|
||
### example | ||
## Optional parameters |
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.
## Optional parameters | |
## Parameters |
| **`end_date`** | `DATE` | Later date | | ||
| **`end_datetime`** | `DATETIME` | Later datetime | | ||
| **`start_date`** | `DATE` | Earlier date | | ||
| **`start_datetime`** | `DATETIME` | Earlier datetime | |
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 / datetime 就可以了
## Description | ||
## Syntax | ||
```sql | ||
WEEKS_SUB([<date_value> | <datetime_value>], <week_period>) |
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.
WEEKS_SUB([<date_value> | <datetime_value>], <week_period>) | |
WEEKS_SUB(<date_value>, <week_period>) |
## Required parameters | ||
**<week_period>** | ||
> Integer representing the number of weeks to be reduced (positive number means reduction, negative number means increase). | ||
|
||
The parameter date can be DATETIME or DATE, and the return type is consistent with that of the parameter date. | ||
## Optional parameters | ||
- **<date_value>** | ||
> Date input value of type `DATE` | ||
|
||
### example | ||
- **<datetime_value>** | ||
> Date and time input value of type `DATETIME` | ||
|
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.
使用表格
|
||
`DATETIME WEEKS_SUB(DATETIME date, INT weeks)` | ||
## Description |
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: specifies how many years each cycle consists of. | ||
- origin: starting from 0001-01-01T00:00:00. | ||
```sql | ||
YEAR_FLOOR([<datetime_value> | <date_value>]) | |
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.
datetime 和 date 就用一个参数表示就可以,在参数说明章节,说清楚可以是date 或者 datetime 就好了
Versions
Languages
Docs Checklist