# Get time difference of two terms in date

**URL:** <https://discuss.elastic.co/t/get-time-difference-of-two-terms-in-date/98077>\
**Category:** Logstash\
**Created:** [August 23, 2017, 12:40pm UTC](https://discuss.elastic.co/t/get-time-difference-of-two-terms-in-date/98077 "2017-08-23T12:40:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinay\_garg](https://avatars.discourse-cdn.com/v4/letter/v/8dc957/32.png) [@vinay\_garg](https://discuss.elastic.co/u/vinay_garg)\
**Post date:** [August 23, 2017, 12:40pm UTC](https://discuss.elastic.co/t/get-time-difference-of-two-terms-in-date/98077/1 "2017-08-23T12:40:40Z")

</div>

Hi,

I have searched the query in previous asked question.  
We are having two field RequestInTime and ResponeOuTime which is in DATA format rather than Date format because of some time RequestInTime is 0.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/4/d47ea07b807d5db3429b919a8e4295fc1066dff5.png)file:///home/vinay/Pictures/Screenshot%20from%202017-08-23%2018-06-45.png

I want to get difference of both highlighted RequestInTime and ResponeOuTime field which have CorrelationID are (Correlation\_Session\_0 and Correlation\_Session\_200) and X-Correlation-Id is same.

Is it possible to get difference by painless script or filter or any other condition?

---

<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:** [September 20, 2017, 12:41pm UTC](https://discuss.elastic.co/t/get-time-difference-of-two-terms-in-date/98077/2 "2017-09-20T12:41:01Z")

</div>

Closed on September 20, 2017, 12:41pm UTC

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