# Current year in to the date filter

**URL:** https://discuss.elastic.co/t/current-year-in-to-the-date-filter/89394
**Category:** Logstash
**Created:** [June 14, 2017, 2:16pm UTC](https://discuss.elastic.co/t/current-year-in-to-the-date-filter/89394 "2017-06-14T14:16:27Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Raghu19](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@Raghu19](https://discuss.elastic.co/u/Raghu19)
#### Post date: [June 14, 2017, 2:16pm UTC](https://discuss.elastic.co/t/current-year-in-to-the-date-filter/89394/1 "2017-06-14T14:16:27Z")

</div>

Dear experts,  
I am generating a config file to parse a log file, which has date in the form of only MON dd.  
e.g., Jun 11, Aug 01 etc  
if i use the date filter, is there a way i can assign current year (2017) to this date?  
appreciate your help on this!

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [June 14, 2017, 2:28pm UTC](https://discuss.elastic.co/t/current-year-in-to-the-date-filter/89394/2 "2017-06-14T14:28:43Z")

</div>

That's what it does by default. I think it's a bit smarter than just using the current year; if you process a "Nov 18" date in Jan 2017 it'll assume that the correct year is 2016 rather than 2017.

---

<div class="post-metadata">

### Author: ![Raghu19](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@Raghu19](https://discuss.elastic.co/u/Raghu19)
#### Post date: [June 14, 2017, 3:22pm UTC](https://discuss.elastic.co/t/current-year-in-to-the-date-filter/89394/3 "2017-06-14T15:22:36Z")

</div>

Thanks a lot! 🙂

---

<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 12, 2017, 3:22pm UTC](https://discuss.elastic.co/t/current-year-in-to-the-date-filter/89394/4 "2017-07-12T15:22:50Z")

</div>

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