Calculate duration in seconds of time filter

Hello.

I would like to calculate the duration of the time filter, (end time - start time) then convert to seconds.

So, if:

  1. 15 minutes, seconds is 900
  2. 1 hour, seconds is 3600
  3. if relative of absolute, then take (end time - start time) and convert to seconds

I would like to then use the duration in seconds in a visualization.

Hello,

So you can use scripted field on your field to display what you would like.

Here is an example for hour of the day.

https://www.elastic.co/guide/en/kibana/current/scripted-fields.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-script-fields.html

Thanks,
Bhavya

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