﻿---
title: ES|QL RANGE_INTERSECTS function
description: 
url: https://docs-v3-preview.elastic.dev/elastic/elasticsearch/pull/152901/reference/query-languages/esql/functions-operators/date-time-functions/range_intersects
products:
  - Elasticsearch
---

# ES|QL RANGE_INTERSECTS function
<applies-to>
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Planned
</applies-to>

Returns true if two date ranges or dates overlap.

## Syntax

![Embedded](https://docs-v3-preview.elastic.dev/elastic/elasticsearch/pull/152901/reference/query-languages/esql/images/generated/x-pack-esql/functions/range_intersects.svg)


## Parameters

<definitions>
  <definition term="left">
    First value (point or range).
  </definition>
  <definition term="right">
    Second value (point or range).
  </definition>
</definitions>


## Description

Returns true if the two arguments overlap. The relation is symmetric — argument order does not matter. Supports any combination of `date` and `date_range`. When both arguments are `date`, this is equivalent to `a == b`.

## Supported types


| left                                                       | right                                                      | result  |
|------------------------------------------------------------|------------------------------------------------------------|---------|
| date                                                       | date                                                       | boolean |
| date                                                       | date_range <applies-to>Elastic Stack: Planned</applies-to> | boolean |
| date_range <applies-to>Elastic Stack: Planned</applies-to> | date                                                       | boolean |
| date_range <applies-to>Elastic Stack: Planned</applies-to> | date_range <applies-to>Elastic Stack: Planned</applies-to> | boolean |


## Example

```esql
FROM employees
| WHERE RANGE_INTERSECTS(hire_date, TO_DATE_RANGE("1985-02-01..1985-03-01"))
| KEEP emp_no, hire_date
| SORT emp_no
```


| emp_no:integer | hire_date:date           |
|----------------|--------------------------|
| 10009          | 1985-02-18T00:00:00.000Z |
| 10048          | 1985-02-24T00:00:00.000Z |

Find ranges that overlap a target window