# Date Range "suddenly" returns no results

**URL:** https://discuss.elastic.co/t/date-range-suddenly-returns-no-results/24821
**Category:** Elasticsearch
**Created:** [July 2, 2015, 6:30pm UTC](https://discuss.elastic.co/t/date-range-suddenly-returns-no-results/24821 "2015-07-02T18:30:24Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![SpinBoldak](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@SpinBoldak](https://discuss.elastic.co/u/SpinBoldak)
#### Post date: [July 2, 2015, 6:30pm UTC](https://discuss.elastic.co/t/date-range-suddenly-returns-no-results/24821/1 "2015-07-02T18:30:24Z")

</div>

Hi,

I'm using a date range to get objects of type Partner based on their age, allowing users to select from a dropdown the ranges like "Younger than 30", "From 30 to 45", "From 45 to 59", "From 59 to 65", "Older than 65". Every range is working except the 45-59 range, which returns no elements at all.

Simplifying everything, I came down to query like:

```
{
  "query": {
    "filtered": {
      "query": {
       "match_all":{}
      },
      "filter": {
            "range": {
              "PARTNER.BirthDate": {
                "from": "-294000000000",
                "to": "-293000000000"
              }
            }
       
      }
    }
  }
}

```

Verbalizing in actual dates, I'm searching for people born from Sep 07th 1960 to Sep 18th. That query returns just fine (800 records).

If I increase the upper value, to -292000000000 (Sep 30th), I'm increasing the filteres interval. Hence, I'm expecting to get more results. Instead, I get 0 zero results.

The behaviour is the same using "lte/gte", and I'm executing the query on the web console (although the problem is also ocurring via the JAVA API).

If I search [-314000000000; -312000000000] or [-94000000000; -92000000000], everything OK. If the filter is [-114000000000;-112000000000] or [-214000000000, -212000000000], I get no results. If I search the same dates with yyyy-mm-dd pattern (from "1963-03-22" to "1963-04-14", for the last example), I get the expected values.

Any ideas on this problem ?

Thanks

---

<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: [July 6, 2017, 12:03am UTC](https://discuss.elastic.co/t/date-range-suddenly-returns-no-results/24821/2 "2017-07-06T00:03:54Z")

</div>


