# Filtering by date field (other than the timestamp) in Kibana dashboard

**URL:** <https://discuss.elastic.co/t/filtering-by-date-field-other-than-the-timestamp-in-kibana-dashboard/322989>\
**Category:** Kibana\
**Created:** [January 12, 2023, 6:30am UTC](https://discuss.elastic.co/t/filtering-by-date-field-other-than-the-timestamp-in-kibana-dashboard/322989 "2023-01-12T06:30:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SaraAlshamsi](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@SaraAlshamsi](https://discuss.elastic.co/u/SaraAlshamsi)\
**Post date:** [January 12, 2023, 6:30am UTC](https://discuss.elastic.co/t/filtering-by-date-field-other-than-the-timestamp-in-kibana-dashboard/322989/1 "2023-01-12T06:30:33Z")

</div>

Hello everyone,

I have an index with several fields and more than 1 time field. For examle:

Field names: "end\_date", "name", "sequence" & "start\_date".

The mapping:

```auto
{
  "check_date_filter": {
    "mappings": {
      "_meta": {
        "created_by": "file-data-visualizer"
      },
      "properties": {
        "@timestamp": {
          "type": "date"
        },
        "end_date": {
          "type": "date",
          "format": "dd/MM/yyyy"
        },
        "name": {
          "type": "keyword"
        },
        "sequence": {
          "type": "long"
        },
        "start_date": {
          "type": "date",
          "format": "dd/MM/yyyy"
        }
      }
    }
  }
}

```

In the dashboard, I'm planning to filter the data based on the "start\_date" or "end\_date".

The problem is that the time picker filters the data based on the timestamp only and the timestamp can't be chosen to be more than 1 date. For example, if the timestamp was the "start\_date", then I will not be able to filter based on the "end\_date" and vise versa.

So, I tried to **add the date as a filter** but it keeps giving me an error.  
"P.S: I don't want to filter it using the (Edit as Query DSL)".

1. Let's say that I have this table:  

2. Adding the filter:  

After I click "Update filter", I get the error:

 ![Screenshot 2023-01-11 161718](https://us1.discourse-cdn.com/elastic/original/3X/6/8/68ac4e2929cb4ef1a8c3ed5053941794bb2996db.png)

1. It complained about the format, so , I changed the format in the filter to match the format of the mapping:

 ![wrong format](https://us1.discourse-cdn.com/elastic/original/3X/7/1/71c91cbed9ade84c2c27e230f37214ae98603d94.png)

But it seems that it doesn't accept this format because I can't click "Update filter".

Is it possible to filter the data in the dashboard based on the dates of different date-fields other than the timestamp directly from the filter, without using (Edit as Query DSL)?

Kibana version v 8.3.3

Regards,

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [January 12, 2023, 3:26pm UTC](https://discuss.elastic.co/t/filtering-by-date-field-other-than-the-timestamp-in-kibana-dashboard/322989/2 "2023-01-12T15:26:49Z")

</div>

Hi @SaraAlshamsi

I think there's a bug in there, I can reproduce it with your setup.  
I workaround I found was to define each filter as Query DSL so you can specify the correct format:

```auto
{
  "query": {
    "range": {
      "start_date": {
        "gte": "01/12/2022",
        "lte": null
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![SaraAlshamsi](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@SaraAlshamsi](https://discuss.elastic.co/u/SaraAlshamsi)\
**Post date:** [January 13, 2023, 5:11am UTC](https://discuss.elastic.co/t/filtering-by-date-field-other-than-the-timestamp-in-kibana-dashboard/322989/3 "2023-01-13T05:11:02Z")

</div>

hi,

I know this solution and that's why I'm asking if I can filter the data without using the "Query DSL". I want it to be straightforward as if I want to filter it as a string value.

Thanks for the prompt reply ..

Regards,

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [January 13, 2023, 8:56am UTC](https://discuss.elastic.co/t/filtering-by-date-field-other-than-the-timestamp-in-kibana-dashboard/322989/4 "2023-01-13T08:56:35Z")

</div>

No I do not think there's an alternative to that as the UI version is converting the date into an ISO-compatible format.

---

<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:** [February 10, 2023, 8:56am UTC](https://discuss.elastic.co/t/filtering-by-date-field-other-than-the-timestamp-in-kibana-dashboard/322989/5 "2023-02-10T08:56:50Z")

</div>

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