# Date histogram Not working

**URL:** <https://discuss.elastic.co/t/date-histogram-not-working/101117>\
**Category:** Kibana\
**Created:** [September 20, 2017, 7:13am UTC](https://discuss.elastic.co/t/date-histogram-not-working/101117 "2017-09-20T07:13:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamizh](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@Tamizh](https://discuss.elastic.co/u/Tamizh)\
**Post date:** [September 20, 2017, 7:13am UTC](https://discuss.elastic.co/t/date-histogram-not-working/101117/1 "2017-09-20T07:13:17Z")

</div>

To migrate my all MySQL data to elasticsearch I used the bulk indexing. After I migrate all my older data. I started to sync my current data flow to the elasticsearch.

when I use kibana to discover the new data, it shows "No result Found". But when I try to discover the older data I can get the results.

The problem got deeper when I try to sort my data by date\_field it is working perfectly. But when I try to use data\_histogram to aggregate the result, newly indexed data is not showing.

Please, someone, suggest me what I did wrong. Thanks, Advance.

---

<div class="post-metadata">

**Author:** ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)\
**Post date:** [September 20, 2017, 5:41pm UTC](https://discuss.elastic.co/t/date-histogram-not-working/101117/2 "2017-09-20T17:41:19Z")

</div>

The index pattern that you use to view your data in Kibana should have a time field attributed with it (for example, `@timestamp`), since you are working with time-based data. Check that the time field you have chosen for the index pattern has the right values in your source data.

> But when I try to discover the older data I can get the results.

This tells me that the time field in your older data is correct.

---

<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:** [October 18, 2017, 5:41pm UTC](https://discuss.elastic.co/t/date-histogram-not-working/101117/3 "2017-10-18T17:41:54Z")

</div>

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