# Date format in response

**URL:** https://discuss.elastic.co/t/date-format-in-response/139988
**Category:** Elasticsearch
**Created:** [July 13, 2018, 6:13pm UTC](https://discuss.elastic.co/t/date-format-in-response/139988 "2018-07-13T18:13:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mats990](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mats990/32/37516_2.png) [@mats990](https://discuss.elastic.co/u/mats990)
#### Post date: [July 13, 2018, 6:13pm UTC](https://discuss.elastic.co/t/date-format-in-response/139988/1 "2018-07-13T18:13:19Z")

</div>

Hi,

Few general Elasticsearch question regarding date data type.  
When I'm indexing my data I'll get that same data in json response in \_source part (if I index string I get String, if I index long/epoch I'll get long/epoch)

- Is it possible to filter documents that are indexed with long/epoch or with String?
- What is preferred way to fetch those documents to get consistent format regardless of the indexing format?

Thanks

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 10, 2018, 6:13pm UTC](https://discuss.elastic.co/t/date-format-in-response/139988/2 "2018-08-10T18:13:19Z")

</div>

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