# How to set a new time filter field?

**URL:** <https://discuss.elastic.co/t/how-to-set-a-new-time-filter-field/212298>\
**Category:** Kibana\
**Created:** [December 18, 2019, 10:08am UTC](https://discuss.elastic.co/t/how-to-set-a-new-time-filter-field/212298 "2019-12-18T10:08:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![florent1](https://avatars.discourse-cdn.com/v4/letter/f/87869e/32.png) [@florent1](https://discuss.elastic.co/u/florent1)\
**Post date:** [December 18, 2019, 10:08am UTC](https://discuss.elastic.co/t/how-to-set-a-new-time-filter-field/212298/1 "2019-12-18T10:08:17Z")

</div>

Hello everyone,

I'm new to ES and Kibana so my question might be stupid, but I can't find how to set the filter time by default for my index.

I've downloaded the kibana sample data eCommerce and it does have a time field :

 ![Capture-20191218110504-1167x148](https://us1.discourse-cdn.com/elastic/original/3X/7/d/7d2bf68220c100ad393ef8577357a6543408b959.png)

I have plenty of "date" fields in my index but I can't seem to find how to define one as the time field that I'd want to use for the time filter. (for my other indexes)

Thanks a lot in advance.

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [December 18, 2019, 10:19pm UTC](https://discuss.elastic.co/t/how-to-set-a-new-time-filter-field/212298/2 "2019-12-18T22:19:27Z")

</div>

Hello,

So you need to make the sure the mapping of the field for which you want it as timefield should be set to date type:

[https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html)

Please check the mapping and if need be correct it in ES.

Thanks,  
Bhavya

---

<div class="post-metadata">

**Author:** ![florent1](https://avatars.discourse-cdn.com/v4/letter/f/87869e/32.png) [@florent1](https://discuss.elastic.co/u/florent1)\
**Post date:** [December 19, 2019, 2:09pm UTC](https://discuss.elastic.co/t/how-to-set-a-new-time-filter-field/212298/3 "2019-12-19T14:09:17Z")

</div>

Thanks for your answer.  
My dates look like this, it seems valid to me. But I can't figure out how to set it as my time filter. The only way I've been able to use time filters is by explicitly defining a time field when using Timelion.

![gnome-shell-screenshot-IFN5C0](https://us1.discourse-cdn.com/elastic/original/3X/7/8/78f666fb72e699420074bc34aed100e86459cfad.png)

---

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [December 19, 2019, 2:22pm UTC](https://discuss.elastic.co/t/how-to-set-a-new-time-filter-field/212298/4 "2019-12-19T14:22:00Z")

</div>

first image you show is for index template,

when you put your data in ES first time it creates Index  
then you have to create index template and you select one of the date as your time field and then you will see exactly what you have been seeing in sample data

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [December 20, 2019, 2:29pm UTC](https://discuss.elastic.co/t/how-to-set-a-new-time-filter-field/212298/5 "2019-12-20T14:29:09Z")

</div>

Florent,

Reading a bit about elasticsearch, index, mapping and index template will help. Here are our docs: [https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started.html)

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:** [January 17, 2020, 2:29pm UTC](https://discuss.elastic.co/t/how-to-set-a-new-time-filter-field/212298/6 "2020-01-17T14:29:12Z")

</div>

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