# How calculate session duration script field

**URL:** <https://discuss.elastic.co/t/how-calculate-session-duration-script-field/263313>\
**Category:** Kibana\
**Created:** [February 4, 2021, 11:16pm UTC](https://discuss.elastic.co/t/how-calculate-session-duration-script-field/263313 "2021-02-04T23:16:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ITchandj](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@ITchandj](https://discuss.elastic.co/u/ITchandj)\
**Post date:** [February 4, 2021, 11:16pm UTC](https://discuss.elastic.co/t/how-calculate-session-duration-script-field/263313/1 "2021-02-04T23:16:46Z")

</div>

Hi @Havana i am new to kibana and i need to create exactly one table that gives me the min and max of a session. please can you tell me how you did it. i would be very happy and thank you in advance

---

<div class="post-metadata">

**Author:** ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)\
**Post date:** [February 8, 2021, 5:24am UTC](https://discuss.elastic.co/t/how-calculate-session-duration-script-field/263313/2 "2021-02-08T05:24:06Z")

</div>

Hi and welcome to our community  
Could you share some details about your data? So you 've got a session records with a min and max value and want to calculate you the duration? Or you've got several records, and you want to calculate min and max of a value?  
Thx & Best,  
Matthias

---

<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:** [March 8, 2021, 5:24am UTC](https://discuss.elastic.co/t/how-calculate-session-duration-script-field/263313/3 "2021-03-08T05:24:15Z")

</div>

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