1

I want to find all logs between two dates however this search does not work

@Timestamp > DateTime(concat('2024-06-19 19:00', 'Z')) and @Timestamp < DateTime(concat('2024-06-19 19:20', 'Z'))

if I use only this query I see results

@Timestamp > DateTime(concat('2024-06-19 19:00', 'Z'))

How do I combine multiple conditions in the search?

The only way I was able to get what I want is by using the "date selector" like this enter image description here

However I want to be able to use it in a query.

3
  • Does it work when you select a date way into the future (ie next year) for the second part of the query? Commented Jun 19, 2024 at 16:56
  • @Caramiriel no it does not Commented Jun 19, 2024 at 17:02
  • @Caramiriel I added more details Commented Jun 19, 2024 at 17:09

1 Answer 1

2

Your query looks fine to me (and works for me in Seq). Check that you aren't filtering out events with a selected signal, and that you don't also have a conflicting date range selected.

If that doesn't work make sure you are on the latest version of Seq.

Sign up to request clarification or add additional context in comments.

2 Comments

select ToIsoString(@Timestamp) as Date, @Timestamp, if @Data.reqBody.source.campaign.name is not null then @Data.reqBody.source.campaign.name else @Message from stream where @Timestamp > 638543137183070000 - 1m and @Timestamp < 638543137183070000 + 1m and (Contains(@Document, '[email protected]') or @Message like '%sending%') and @Data.endTime is null order by Date desc -> this query works but I still can not easily transform string into date
The is not null then bit can be replaced with the coalesce function (docs.datalust.co/docs/scalar-functions#coalescearg0-arg1-). DateTime transforms strings into timestamps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.