# Store time lapsed between two events

**URL:** <https://discuss.elastic.co/t/store-time-lapsed-between-two-events/287991>\
**Category:** Elasticsearch\
**Created:** [October 29, 2021, 10:19am UTC](https://discuss.elastic.co/t/store-time-lapsed-between-two-events/287991 "2021-10-29T10:19:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frederick\_Faria](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frederick_faria/32/96510_2.png) [@Frederick\_Faria](https://discuss.elastic.co/u/Frederick_Faria)\
**Post date:** [October 29, 2021, 10:19am UTC](https://discuss.elastic.co/t/store-time-lapsed-between-two-events/287991/1 "2021-10-29T10:19:35Z")

</div>

I need to store a time duration two events and have as in HH:mm:ss.SSS. I tried using Date type with basic\_time format but it do now allows me to save more than 23 hours.

How would you recommend to proceed in this case?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 29, 2021, 12:15pm UTC](https://discuss.elastic.co/t/store-time-lapsed-between-two-events/287991/2 "2021-10-29T12:15:24Z")

</div>

Welcome!

Do not store it as a date but as a duration.  
Depending on the precision you want, store this as a number of seconds, minutes or hours...

---

<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:** [November 26, 2021, 12:16pm UTC](https://discuss.elastic.co/t/store-time-lapsed-between-two-events/287991/3 "2021-11-26T12:16:04Z")

</div>

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