elasticsearch/docs/reference/sql
Marios Trivyzas ead743d357
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
2019-10-01 15:59:25 +03:00
..
appendix SQL: Implement CURRENT_TIME/CURTIME functions (#40662) 2019-04-03 19:35:37 +02:00
endpoints DOC: Fix typo 2019-09-16 12:33:58 +03:00
functions SQL: Implement DATE_PART function (#47206) 2019-10-01 15:59:25 +03:00
language SQL: Add support for shape type (#46464) 2019-09-25 13:43:05 -04:00
concepts.asciidoc [DOCS] Replaces CCS terms with attributes (#40076) 2019-03-15 07:54:45 -07:00
getting-started.asciidoc [DOCS] Replace "// CONSOLE" comments with [source,console] (#46159) 2019-09-04 12:51:02 -04:00
index.asciidoc SQL: Spec tests now use classpath discovery (#40388) 2019-03-25 15:22:59 +02:00
limitations.asciidoc Switch from using docvalue_fields to extracting values from _source (#44062) 2019-07-24 13:59:02 +03:00
overview.asciidoc SQL: remove beta marker from documentation (#38661) 2019-02-10 00:09:03 +02:00
security.asciidoc [DOCS] Remove unneeded options from [source,sql] code blocks (#42759) 2019-05-31 13:03:41 -04:00