liukun4515 commented on a change in pull request #1991:
URL: https://github.com/apache/arrow-datafusion/pull/1991#discussion_r824735397
##########
File path: docs/source/user-guide/sql/datafusion-functions.md
##########
@@ -84,3 +84,31 @@ Note that `CAST(.. AS Timestamp)` converts to Timestamps
with Nanosecond resolut
- Other Timestamp() columns or values
Note that `CAST(.. AS Timestamp)` converts to Timestamps with Nanosecond
resolution; this function is the only way to convert/cast to seconds resolution.
+
+## `EXTRACT, date_part`
+
+`EXTRACT(field FROM source)`
+
+- The extract function retrieves subfields such as year or hour from date/time
values.
+ source must be a value expression of type timestamp, Data32, Data64 field is
an identifier that selects what field to extract from the source value.
+ The extract function returns values of type u32.
+ - `year`
+ - `EXTRACT(year FROM to_timestamp('2020-09-08T12:00:00+00:00')) -> 2020`
Review comment:
```suggestion
- `year`: EXTRACT(year FROM to_timestamp('2020-09-08T12:00:00+00:00')) ->
2020
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]