# Advance settings - Time filter quick ranges - Date math

**URL:** <https://discuss.elastic.co/t/advance-settings-time-filter-quick-ranges-date-math/348939>\
**Category:** Elasticsearch\
**Created:** [December 8, 2023, 7:55pm UTC](https://discuss.elastic.co/t/advance-settings-time-filter-quick-ranges-date-math/348939 "2023-12-08T19:55:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amphagory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amphagory/32/46127_2.png) [@Amphagory](https://discuss.elastic.co/u/Amphagory)\
**Post date:** [December 8, 2023, 7:55pm UTC](https://discuss.elastic.co/t/advance-settings-time-filter-quick-ranges-date-math/348939/1 "2023-12-08T19:55:59Z")

</div>

Hello,

I'm try to create some custom time range filters. I would like to create two new ones named as follows:

This Year - Time range is from the beginning of the current year to now.  
Last Year - Time range is from the beginning of the last year to the end of last year.

Is it possible to create these two custom time range filters using data math? Maybe the Advance settings for the time filter quick ranges can use other ways in creating what I want?

Mike

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [December 8, 2023, 9:08pm UTC](https://discuss.elastic.co/t/advance-settings-time-filter-quick-ranges-date-math/348939/2 "2023-12-08T21:08:34Z")

</div>

Hi @Amphagory

Kiabana -\> Stack Management -\> Advanced Settings

And just set them in the time picker

### Time filter quick ranges

I think these are right

```auto
 {
    "from": "now/y",
    "to": "now",
    "display": "This Year"
  },
  {
    "from": "now-1y/y",
    "to": "now-1y/y",
    "display": "Last Year"
  },

```

---

<div class="post-metadata">

**Author:** ![Amphagory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amphagory/32/46127_2.png) [@Amphagory](https://discuss.elastic.co/u/Amphagory)\
**Post date:** [December 8, 2023, 9:38pm UTC](https://discuss.elastic.co/t/advance-settings-time-filter-quick-ranges-date-math/348939/4 "2023-12-08T21:38:13Z")

</div>

Hello,

I think there is a copy and paste issue with the Last Year, I think it should look like:

```auto
  {
    "from": "now/y-1y",
    "to": "now-1y/y",
    "display": "Last Year"
  },

```

Thanks for your answer!

Mike

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [December 8, 2023, 9:50pm UTC](https://discuss.elastic.co/t/advance-settings-time-filter-quick-ranges-date-math/348939/5 "2023-12-08T21:50:15Z")

</div>

Yeah ... probably Right I did it quick ... Good QA 🙂

---

<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 5, 2024, 9:50pm UTC](https://discuss.elastic.co/t/advance-settings-time-filter-quick-ranges-date-math/348939/6 "2024-01-05T21:50:31Z")

</div>

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