# Eql with time range

**URL:** <https://discuss.elastic.co/t/eql-with-time-range/346928>\
**Category:** Elasticsearch\
**Tags:** eql-elastic-query-language\
**Created:** [November 12, 2023, 1:30pm UTC](https://discuss.elastic.co/t/eql-with-time-range/346928 "2023-11-12T13:30:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mary-20](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mary-20/32/124057_2.png) [@mary-20](https://discuss.elastic.co/u/mary-20)\
**Post date:** [November 12, 2023, 1:30pm UTC](https://discuss.elastic.co/t/eql-with-time-range/346928/1 "2023-11-12T13:30:22Z")

</div>

Hi guys,  
I'm looking for EQL to match logs with a timestamp within the last 5 minutes.  
I have read a `with maxspan` statement, but it has some limitation:

- It must be used with `sequence`
- it starts at the first event’s timestamp (not now() ).

How can I do this?

---

<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:** [December 10, 2023, 1:31pm UTC](https://discuss.elastic.co/t/eql-with-time-range/346928/2 "2023-12-10T13:31:21Z")

</div>

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