Convert string type(coming from spark structured streaming) to datetime(2019-01-02 17:16:04) in Elastic search and apply aggregation

I am using spark structured streaming and save my data to ES and want to create dashboard from Kibana.
In spark , I have order data and I have created_at field in spark, which is String type.
I need to convert it into datetime.
But in spark when I am doing this, I got converted into some long value in Elastic search for that date.
check this :-

So , My problem is How to convert string (created_at) to date(created_at) in Elastic search and apply aggreagations.

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