Find a result between two dates

I have Graylog up and running.
Now I have an issue with querying data from Graylog. I have 2 fields named ‘begin’ and ‘end’,now I am searching for a data with a date that lies between begin and end.

I am looking for a query something like sql

SELECT begin, end
FROM mytable
WHERE ‘2019-12-25’ between begin and end.

Community members, please help.

Hi nintoantony,

When you say between ‘begin’ and ‘end’ do you mean like ‘2019-12-25’ between two dates, or do you mean something like message is "NOTE this is sample 2019-12-25 date OK’, where begin and end are “NOTE” and “OK”?

Cheers!

Yes I mean ‘2019-12-25’ between two dates.
begin and end are my field names.

In that case I think you need to use Absolute search method where you define specific start and end date an the Graylog will show you the logs only from that period of time.

You can find more information on the wiki page bellow.

http://docs.graylog.org/en/3.1/pages/queries.html#time-frame-selector

But that will only find data based on timestamp field.

Can you tell me how do you extract those fields ‘begin’ and ‘end’? Not sure if it possible to extract dates in that format and to still threat them as dates and not strings.

begin and end are two field names in my data as shown in the above image. I am sending this data from a .NET application.I am successfully getting data if I pass exact begin and end dates. Now I would like to get data if I pass a date that falls between begin and end dates.

I have tried like this begin:>2019-12-15 AND 2019-12-15:<end but it is not working

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