Date time format new

Can any one suggest how to retrieve a date from index with formated. below is my mapping and value stored in index.

my mapping
"createddate": {
"type": "date"

"createddate": "2018-03-30T08:30:46.865Z"


can you please describe your issue a bit more? What do you mean with retrieve a date - are you talking about writing a query that searches this field? If so, take a look at the range query.

If you meant something different, please elaborate.

Thank you!


"while getting the result from elastic search "
for example the value stored in index is "2018-03-29T12:13:18.731Z"
while getting the value i need to formated like "2018-03-29 12:13".


the data elasticsearch returns here, is simply the data you stored. You could change this on index time (and also change the detection of the format when parsing this), you could use a script field (not recommended, as it's pretty slow) or you could just do an additional parsing step on the client side of things.



i am not displaying the value in client side. I need to export to csv using logstash. is there any way to parse the data in elastic search itself and also we need to search the date with timezone.


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