# Want to add duration (in seconds) to timestamp

**URL:** https://discuss.elastic.co/t/want-to-add-duration-in-seconds-to-timestamp/125003
**Category:** Logstash
**Created:** [March 21, 2018, 2:29pm UTC](https://discuss.elastic.co/t/want-to-add-duration-in-seconds-to-timestamp/125003 "2018-03-21T14:29:10Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![MarBel78](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marbel78/32/28822_2.png) [@MarBel78](https://discuss.elastic.co/u/MarBel78)
#### Post date: [March 21, 2018, 2:29pm UTC](https://discuss.elastic.co/t/want-to-add-duration-in-seconds-to-timestamp/125003/1 "2018-03-21T14:29:10Z")

</div>

Dear all,

i want to add a given durations (in seconds) to timestamp into a new field.  
In the end, i have the start time (timestamp) and the end time.

What is the easiest way during import by logstash ?

Thanks a lot!

---

<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: [March 22, 2018, 1:50am UTC](https://discuss.elastic.co/t/want-to-add-duration-in-seconds-to-timestamp/125003/2 "2018-03-22T01:50:46Z")

</div>

If you have both the start time (timestamp) and end time in the same event then [this](https://discuss.elastic.co/t/time-difference-between-two-fields-in-a-csv-using-ruby-plugin/122115/2?u=badger) might help.

If you have the start time and end time in different events then an [aggregate filter](https://www.elastic.co/guide/en/logstash/current/plugins-filters-aggregate.html) might work for you.

---

<div class="post-metadata">

### Author: ![MarBel78](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marbel78/32/28822_2.png) [@MarBel78](https://discuss.elastic.co/u/MarBel78)
#### Post date: [March 22, 2018, 12:00pm UTC](https://discuss.elastic.co/t/want-to-add-duration-in-seconds-to-timestamp/125003/3 "2018-03-22T12:00:44Z")

</div>

I habe the start time and the duration (in seconds). Thanks.

---

<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: [April 19, 2018, 12:00pm UTC](https://discuss.elastic.co/t/want-to-add-duration-in-seconds-to-timestamp/125003/4 "2018-04-19T12:00:44Z")

</div>

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