# Calculate session time

**URL:** <https://discuss.elastic.co/t/calculate-session-time/50201>\
**Category:** Kibana\
**Created:** [May 17, 2016, 9:20am UTC](https://discuss.elastic.co/t/calculate-session-time/50201 "2016-05-17T09:20:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wesley\_Smekens](https://avatars.discourse-cdn.com/v4/letter/w/dc4da7/32.png) [@Wesley\_Smekens](https://discuss.elastic.co/u/Wesley_Smekens)\
**Post date:** [May 17, 2016, 9:20am UTC](https://discuss.elastic.co/t/calculate-session-time/50201/1 "2016-05-17T09:20:54Z")

</div>

Hey all,

I'm new to ELK but i have a working stack running with a decent filtered log.  
We are logging our application and something we want to see is the time a user is using a session.  
We are sending the session id and the timestamp, is it possible to calculate this in kibana?

---

<div class="post-metadata">

**Author:** ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)\
**Post date:** [May 17, 2016, 3:54pm UTC](https://discuss.elastic.co/t/calculate-session-time/50201/2 "2016-05-17T15:54:26Z")

</div>

Hi Wesley,

This is actually something that would be better accomplished at the Elasticsearch level. I'd suggest getting started by first reading this:

[https://www.elastic.co/elasticon/2015/sf/building-entity-centric-indexes](https://www.elastic.co/elasticon/2015/sf/building-entity-centric-indexes)

---

<div class="post-metadata">

**Author:** ![Wesley\_Smekens](https://avatars.discourse-cdn.com/v4/letter/w/dc4da7/32.png) [@Wesley\_Smekens](https://discuss.elastic.co/u/Wesley_Smekens)\
**Post date:** [May 18, 2016, 10:53am UTC](https://discuss.elastic.co/t/calculate-session-time/50201/3 "2016-05-18T10:53:46Z")

</div>

Thanks, i'll look into it

---

<div class="post-metadata">

**Author:** ![Wesley\_Smekens](https://avatars.discourse-cdn.com/v4/letter/w/dc4da7/32.png) [@Wesley\_Smekens](https://discuss.elastic.co/u/Wesley_Smekens)\
**Post date:** [August 4, 2016, 9:08am UTC](https://discuss.elastic.co/t/calculate-session-time/50201/4 "2016-08-04T09:08:55Z")

</div>

Anyone got examples on how to use this?

---

<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:** [July 6, 2017, 1:42pm UTC](https://discuss.elastic.co/t/calculate-session-time/50201/5 "2017-07-06T13:42:05Z")

</div>


