Visualization lens chart filter by max and min timestamp

Hi everyone,

I'm trying to figure out how to filter timestamp by getting the max and min of 2 date. I have tried to use "aggs" but I get error instead.

I have a sql query condition that I need to turn into kibana chart to filter the data from the index document.

Below is the sample sql query that use for the db result. Appreciate if there are some insight on how to do this.

MIN(BDT.ACTIVATE_DT) START_TIME, 
MAX(BDT.APPROVE_DT) END_TIME,
ROUND(((MAX(BDT.APPROVE_DT) - MIN(BDT.ACTIVATE_DT)) * 24), 2) TIME_TAKEN_HR

Hi, I'm pretty sure you don't need an SQL query for this. If you are in Lens and need to filter documents based on a time range, you can click the "Add filter" button, which is a "plus" icon, to show a form where you select your time field, select is between, and then enter the min and max dates.

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