# Finding gaps in timestamps in documents

**URL:** <https://discuss.elastic.co/t/finding-gaps-in-timestamps-in-documents/142738>\
**Category:** Elasticsearch\
**Created:** [August 2, 2018, 9:53am UTC](https://discuss.elastic.co/t/finding-gaps-in-timestamps-in-documents/142738 "2018-08-02T09:53:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cohenran](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cohenran/32/29697_2.png) [@cohenran](https://discuss.elastic.co/u/cohenran)\
**Post date:** [August 2, 2018, 9:53am UTC](https://discuss.elastic.co/t/finding-gaps-in-timestamps-in-documents/142738/1 "2018-08-02T09:53:52Z")

</div>

I have documents with different timestamps. How can I find out if there are 2 consecutive timestamps with more 10 seconds apart?  
If I have the timestamps:  
timestamp1: 1533130500544  
timestamp2: 1533130509544  
timestamp3: 1533130515544  
timestamp4: 1533130526544  
timestamp5: 1533130527544  
timestamp6: 1533130530544  
...

The program would output timestamp3 and timestamp4.  
How can I do this?

---

<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 30, 2018, 9:53am UTC](https://discuss.elastic.co/t/finding-gaps-in-timestamps-in-documents/142738/2 "2018-08-30T09:53:54Z")

</div>

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