# Add a new filed in csv based on a value in colum and cal the time diff

**URL:** https://discuss.elastic.co/t/add-a-new-filed-in-csv-based-on-a-value-in-colum-and-cal-the-time-diff/196117
**Category:** Logstash
**Created:** [August 21, 2019, 1:06pm UTC](https://discuss.elastic.co/t/add-a-new-filed-in-csv-based-on-a-value-in-colum-and-cal-the-time-diff/196117 "2019-08-21T13:06:46Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [August 21, 2019, 1:26pm UTC](https://discuss.elastic.co/t/add-a-new-filed-in-csv-based-on-a-value-in-colum-and-cal-the-time-diff/196117/2 "2019-08-21T13:26:40Z")

</div>

Take at look at [this](https://discuss.elastic.co/t/problem-with-combining-xmlfilter-and-ruby-code-to-compute-a-time-difference/195924/2) post for calculating the difference. You can set the status based on whether you get a \_dateparsefailure on the endtime.

---

_[View the full topic](https://discuss.elastic.co/t/add-a-new-filed-in-csv-based-on-a-value-in-colum-and-cal-the-time-diff/196117)._
