Skip to content
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

Update scalar functions doc for extract/datepart #8682

Merged
merged 1 commit into from
Jan 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/source/user-guide/sql/scalar_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -1410,6 +1410,7 @@ date_part(part, expression)
The following date parts are supported:

- year
- quarter _(emits value in inclusive range [1, 4] based on which quartile of the year the date is in)_
- month
- week _(week of the year)_
- day _(day of the month)_
Expand All @@ -1421,6 +1422,7 @@ date_part(part, expression)
- nanosecond
- dow _(day of the week)_
- doy _(day of the year)_
- epoch _(seconds since Unix epoch)_

- **expression**: Time expression to operate on.
Can be a constant, column, or function.
Expand Down Expand Up @@ -1448,6 +1450,7 @@ extract(field FROM source)
The following date fields are supported:

- year
- quarter _(emits value in inclusive range [1, 4] based on which quartile of the year the date is in)_
- month
- week _(week of the year)_
- day _(day of the month)_
Expand All @@ -1459,6 +1462,7 @@ extract(field FROM source)
- nanosecond
- dow _(day of the week)_
- doy _(day of the year)_
- epoch _(seconds since Unix epoch)_

- **source**: Source time expression to operate on.
Can be a constant, column, or function.
Expand Down