Extract date from timestamp field


i have a time field and i want to extract date from it in my elasticsearch sql query.

Below is the format of time: 2020-01-11T02:13:00.000Z
which function in elasticsearch sql query will extract the date from it.
I am using date_part function but its not return the date
"DATE_PART('date', time) AS logindate"

Please help.

POST /_sql?format=csv
  "query": "SELECT DATETIME_FORMAT(CAST('2020-01-11T02:13:00.000Z' AS DATE), 'dd/MM/YYYY') as mydate"



This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.