# Syslog date without year

**URL:** <https://discuss.elastic.co/t/syslog-date-without-year/29834>\
**Category:** Logstash\
**Created:** [September 23, 2015, 11:10am UTC](https://discuss.elastic.co/t/syslog-date-without-year/29834 "2015-09-23T11:10:34Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![gaurav1424](https://avatars.discourse-cdn.com/v4/letter/g/97f17d/32.png) [@gaurav1424](https://discuss.elastic.co/u/gaurav1424)\
**Post date:** [January 29, 2016, 1:55am UTC](https://discuss.elastic.co/t/syslog-date-without-year/29834/9 "2016-01-29T01:55:06Z")

</div>

I am following this thread : [http://stackoverflow.com/questions/29384754/syslog-timestamp-without-year](http://stackoverflow.com/questions/29384754/syslog-timestamp-without-year)

My requirement is :  
If syslog message comes with year in timestamp, I should match in date filter and take that year as time and put it in elasticsearch, If there is not year in syslog timestamp, then I need to have some default year / some default value which I will know in future, How can I do that ?

My date filter is :  
date {  
target =\> "@timestamp"  
match =\> [ "syslog\_timestamp",  
"MMM d HH:mm:ss YYYY",  
"MMM dd HH:mm:ss YYYY" ]  
timezone =\> "UTC"  
}

Here If syslog\_timestamp does not contains year then this fails.

---

_[View the full topic](https://discuss.elastic.co/t/syslog-date-without-year/29834)._
