# Formulate query for comparing timestamps

**URL:** <https://discuss.elastic.co/t/formulate-query-for-comparing-timestamps/260334>\
**Category:** Elasticsearch\
**Created:** [January 6, 2021, 11:56am UTC](https://discuss.elastic.co/t/formulate-query-for-comparing-timestamps/260334 "2021-01-06T11:56:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Farid\_N](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/farid_n/32/74144_2.png) [@Farid\_N](https://discuss.elastic.co/u/Farid_N)\
**Post date:** [January 6, 2021, 11:56am UTC](https://discuss.elastic.co/t/formulate-query-for-comparing-timestamps/260334/1 "2021-01-06T11:56:10Z")

</div>

Hi  
I want to write a query to compare two timestamp in bellow Image:

 ![Timestamp](https://us1.discourse-cdn.com/elastic/original/3X/d/6/d63229a9795020d196ce32ddc0741edc07995942.jpeg)

I want a query, to check this two Timestamp... (Only hour and minute)  
and return the log if there are not equal....

Can you help me how can I write a query?

Thanks in advance

---

<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:** [February 3, 2021, 11:56am UTC](https://discuss.elastic.co/t/formulate-query-for-comparing-timestamps/260334/2 "2021-02-03T11:56:16Z")

</div>

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