# Query Url - Date field not works

**URL:** https://discuss.elastic.co/t/query-url-date-field-not-works/328816
**Category:** Elasticsearch
**Created:** [March 29, 2023, 12:12pm UTC](https://discuss.elastic.co/t/query-url-date-field-not-works/328816 "2023-03-29T12:12:03Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![SalvoDM91](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@SalvoDM91](https://discuss.elastic.co/u/SalvoDM91)
#### Post date: [March 29, 2023, 12:12pm UTC](https://discuss.elastic.co/t/query-url-date-field-not-works/328816/1 "2023-03-29T12:12:03Z")

</div>

Hi guys,

I'm trying to create a url query with a date field.  
Currently in the index I have 2 date fields "@timestamp" and "CALL\_DATE" both correctly recognized as "date".  
Index mapping:

```auto
{
  "cgw_calls" : {
    "mappings" : {
      "properties" : {
        "@timestamp" : {
          "type" : "date"
        },
        "@version" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "INSTITUTE" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "type" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "﻿CALL_DATE" : {
          "type" : "date"
        }
      }
    }
  }
}

```

URL query (works fine):

```auto
http://localhost:9200/cgw_calls/_search?default_operator=AND&q=INSTITUTE:*+@timestamp:[2023-03-01+TO+2023-03-31]&size=0&track_total_hits=true

```

URL query (not works):

```auto
http://localhost:9200/cgw_calls/_search?default_operator=AND&q=INSTITUTE:*+CALL_DATE:[2023-03-01+TO+2023-03-31]&size=0&track_total_hits=true

```

If I use the same filter with @timestamp it works, with CALL\_DATE it doesn't.

Can you help me understand why it doesn't work?

---

<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: [April 26, 2023, 12:12pm UTC](https://discuss.elastic.co/t/query-url-date-field-not-works/328816/2 "2023-04-26T12:12:57Z")

</div>

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