OpenSearch/docs/reference/sql
Marios Trivyzas f792dbf239 SQL: Implement DATE_PART function (#47206)
DATE_PART(<datetime unit>, <date/datetime>) is a function that allows
the user to extract the specified unit from a date/datetime field
similar to the EXTRACT (<datetime unit> FROM <date/datetime>) but
with different names and aliases for the units and it also provides more
options like `DATE_PART('tzoffset', datetimeField)`.

Implemented following the SQL server's spec: https://docs.microsoft.com/en-us/sql/t-sql/functions/datepart-transact-sql?view=sql-server-2017
with the difference that the <datetime unit> argument is either a
literal single quoted string or gets a value from a table field, whereas
in SQL server keywords are used (unquoted identifiers) and it's not
possible to use a value coming for a table column.

Closes: #46372
(cherry picked from commit ead743d3579eb753fd314d4a58fae205e465d72e)
2019-10-01 16:28:27 +03:00
..
appendix
endpoints DOC: Fix typo 2019-09-16 12:35:21 +03:00
functions SQL: Implement DATE_PART function (#47206) 2019-10-01 16:28:27 +03:00
language SQL: Add support for shape type (#46464) 2019-09-26 09:47:42 -04:00
concepts.asciidoc
getting-started.asciidoc [DOCS] Replace "// CONSOLE" comments with [source,console] (#46159) (#46332) 2019-09-05 10:11:25 -04:00
index.asciidoc [DOCS] Edits 7.3 release highlights (#45066) 2019-07-31 15:49:27 -07:00
limitations.asciidoc Switch from using docvalue_fields to extracting values from _source (#44062) (#44804) 2019-07-25 10:02:41 +03:00
overview.asciidoc
security.asciidoc [DOCS] Remove unneeded options from `[source,sql]` code blocks (#42759) 2019-05-31 13:05:13 -04:00