I'm using the doc https://opendistro.github.io/for-elasticsearch-docs/docs/sql/functions/#date-and-time and https://opensearch.org/docs/latest/search-plugins/sql/functions/#date-and-time but haven't found any function like DATEDIFF()
in elasticsearch.
I also tried the arithmetic operator with date typed column and it doesn't seem to work either (This query is not explainable):
SELECT timestamp(end_date) - timestamp(start_date) FROM <table>