elasticsearch/docs/reference/esql/functions/date_format.asciidoc

12 lines
316 B
Plaintext
Raw Normal View History

2023-05-11 23:02:27 +08:00
[[esql-date_format]]
=== `DATE_FORMAT`
Returns a string representation of a date in the provided format. If no format
is specified, the `yyyy-MM-dd'T'HH:mm:ss.SSSZ` format is used.
[source,esql]
----
FROM employees
| PROJECT first_name, last_name, hire_date
| EVAL hired = DATE_FORMAT(hire_date, "YYYY-MM-dd")
----