36 lines
660 B
Plaintext
36 lines
660 B
Plaintext
[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]
|
|
|===
|