# How to get the timestamp difference

**URL:** https://discuss.elastic.co/t/how-to-get-the-timestamp-difference/275746
**Category:** Kibana
**Created:** [June 13, 2021, 3:16am UTC](https://discuss.elastic.co/t/how-to-get-the-timestamp-difference/275746 "2021-06-13T03:16:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Kiran\_manohar\_Chaval](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kiran_manohar_chaval/32/90204_2.png) [@Kiran\_manohar\_Chaval](https://discuss.elastic.co/u/Kiran_manohar_Chaval)
#### Post date: [June 13, 2021, 3:16am UTC](https://discuss.elastic.co/t/how-to-get-the-timestamp-difference/275746/1 "2021-06-13T03:16:39Z")

</div>

![kibana](https://us1.discourse-cdn.com/elastic/original/3X/5/8/58220e9fbb857dd9f4779acce88e9748f6277471.png)

Hi All

I am trying to get timestamp difference for the following kql filter

Here log\_message and timestamp are fields

Screenshot attached

log\_message : "submit async job-514" or log\_message : "Complete async job-514"

The filter throws two documents having different timestamp field values.

Do I need to use scripted fields, vega, timelion to get the difference

Any help on this would be helpful

---

<div class="post-metadata">

### Author: ![Kiran\_manohar\_Chaval](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kiran_manohar_chaval/32/90204_2.png) [@Kiran\_manohar\_Chaval](https://discuss.elastic.co/u/Kiran_manohar_Chaval)
#### Post date: [June 15, 2021, 3:56am UTC](https://discuss.elastic.co/t/how-to-get-the-timestamp-difference/275746/2 "2021-06-15T03:56:14Z")

</div>

Any help on this

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [June 15, 2021, 4:38am UTC](https://discuss.elastic.co/t/how-to-get-the-timestamp-difference/275746/3 "2021-06-15T04:38:27Z")

</div>

Welcome to our community! 😃

This has been asked before numerous times, I would suggest doing a quick search for existing topics 🙂

---

<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: [July 13, 2021, 4:38am UTC](https://discuss.elastic.co/t/how-to-get-the-timestamp-difference/275746/4 "2021-07-13T04:38:39Z")

</div>

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