mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-29 01:44:36 -04:00
* Functions starting with A * Functions starting with 'C' * More 'C' functions * Fix tests * Fix missing snippet * DATE_* functions * Apply suggestions from code review Co-authored-by: Bogdan Pintea <pintea@mailbox.org> --------- Co-authored-by: Bogdan Pintea <pintea@mailbox.org>
35 lines
660 B
Text
35 lines
660 B
Text
[discrete]
|
|
[[esql-date_format]]
|
|
=== `DATE_FORMAT`
|
|
|
|
*Syntax*
|
|
|
|
[source,esql]
|
|
----
|
|
DATE_FORMAT([format,] date)
|
|
----
|
|
|
|
*Parameters*
|
|
|
|
`format`::
|
|
Date format (optional). If no format is specified, the
|
|
`yyyy-MM-dd'T'HH:mm:ss.SSSZ` format is used. If `null`, the function returns
|
|
`null`.
|
|
|
|
`date`::
|
|
Date expression. If `null`, the function returns `null`.
|
|
|
|
*Description*
|
|
|
|
Returns a string representation of a date, in the provided format.
|
|
|
|
*Example*
|
|
|
|
[source.merge.styled,esql]
|
|
----
|
|
include::{esql-specs}/date.csv-spec[tag=docsDateFormat]
|
|
----
|
|
[%header.monospaced.styled,format=dsv,separator=|]
|
|
|===
|
|
include::{esql-specs}/date.csv-spec[tag=docsDateFormat-result]
|
|
|===
|