# Multi field time-picker?

**URL:** https://discuss.elastic.co/t/multi-field-time-picker/50907
**Category:** Kibana
**Created:** [May 25, 2016, 6:12am UTC](https://discuss.elastic.co/t/multi-field-time-picker/50907 "2016-05-25T06:12:05Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Marcin\_Kubica](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_kubica/32/5614_2.png) [@Marcin\_Kubica](https://discuss.elastic.co/u/Marcin_Kubica)
#### Post date: [May 25, 2016, 6:12am UTC](https://discuss.elastic.co/t/multi-field-time-picker/50907/1 "2016-05-25T06:12:05Z")

</div>

HI

One of use cases I have here deals with a sessions log where I have start\_time and end\_time of a session.

It's easy to get sessions vis for all start\_time ones.

How can I also have a query with Kibana which would include sessions with end\_time for the window requested with time picker?

Is there a way to parse or inject the scope of time picker to build a query against two date-fields?

Thanks!  
Marcin

---

<div class="post-metadata">

### Author: ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)
#### Post date: [May 25, 2016, 9:42pm UTC](https://discuss.elastic.co/t/multi-field-time-picker/50907/2 "2016-05-25T21:42:31Z")

</div>

What are you looking to gain insights into? If you are looking to visual the duration of the sessions over time, you could use a scripted field to calculate the difference between the end\_time and start\_time.

---

<div class="post-metadata">

### Author: ![Marcin\_Kubica](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_kubica/32/5614_2.png) [@Marcin\_Kubica](https://discuss.elastic.co/u/Marcin_Kubica)
#### Post date: [June 3, 2016, 8:16am UTC](https://discuss.elastic.co/t/multi-field-time-picker/50907/3 "2016-06-03T08:16:37Z")

</div>

Hi @tsmalley

Sorry for a silence from my side.

Let me picture it out.

 ![](https://us1.discourse-cdn.com/elastic/original/2X/1/1f4afc83cbcd183c1d70850210e7baa286ecec5b.png)

Arrows represent user sessions over time, and these sessions bear some statistic data, let's say Value\_X

Sessions have `start_time` and `end_time`.

Red vertical lines represent the analysis time window required.

A - session started before the window and finished within window  
B - session started and ended within the window  
C - session started within the window and ended outside the window  
D - session started before the window and finished after the window

Use case it to capture this with Kibana and do some ops on Value X - ie. sum value\_x

---

<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:51pm UTC](https://discuss.elastic.co/t/multi-field-time-picker/50907/4 "2017-07-06T13:51:39Z")

</div>


