# Date filtering from crash course part 2

**URL:** https://discuss.elastic.co/t/date-filtering-from-crash-course-part-2/288934
**Category:** Elasticsearch
**Created:** [November 10, 2021, 10:22pm UTC](https://discuss.elastic.co/t/date-filtering-from-crash-course-part-2/288934 "2021-11-10T22:22:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![iamtheschmitzer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/iamtheschmitzer/32/96988_2.png) [@iamtheschmitzer](https://discuss.elastic.co/u/iamtheschmitzer)
#### Post date: [November 10, 2021, 10:22pm UTC](https://discuss.elastic.co/t/date-filtering-from-crash-course-part-2/288934/1 "2021-11-10T22:22:10Z")

</div>

In part 2 of the crash course [Part-2-Understanding-the-relevance-of-your-search-with-Elasticsearch-and-Kibana-/README.md at main · LisaHJung/Part-2-Understanding-the-relevance-of-your-search-with-Elasticsearch-and-Kibana- · GitHub](https://github.com/LisaHJung/Part-2-Understanding-the-relevance-of-your-search-with-Elasticsearch-and-Kibana-/blob/main/README.md) I see this date filter used:

```auto
GET news_headlines/_search
{
  "query": {
    "range": {
      "date": {
        "gte": "2015-06-20",
        "lte": "2015-09-22"
      }
    }
  }
}

```

Does Elasticsearch interpret these as dates? Or is it just a string, and the date filtering is truly a string filter? Or put another way, if the date field in these documents were formatted in a less-friendly way, like `4/7/2021` and `10/13/2021`, would these be correctly filterable?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [November 10, 2021, 11:03pm UTC](https://discuss.elastic.co/t/date-filtering-from-crash-course-part-2/288934/2 "2021-11-10T23:03:51Z")

</div>

Yes it'll translate that into a time format that Elasticsearch can then query against the data.

Take a look at [format | Elasticsearch Guide [7.15] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html) for what formats are supported.

---

<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 8, 2021, 11:03pm UTC](https://discuss.elastic.co/t/date-filtering-from-crash-course-part-2/288934/3 "2021-12-08T23:03:59Z")

</div>

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