# Time/Date logic in logstash conf

**URL:** https://discuss.elastic.co/t/time-date-logic-in-logstash-conf/76824
**Category:** Logstash
**Created:** [February 28, 2017, 4:31pm UTC](https://discuss.elastic.co/t/time-date-logic-in-logstash-conf/76824 "2017-02-28T16:31:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Keeper-of-the-Keys](https://avatars.discourse-cdn.com/v4/letter/k/7bcc69/32.png) [@Keeper-of-the-Keys](https://discuss.elastic.co/u/Keeper-of-the-Keys)
#### Post date: [February 28, 2017, 4:31pm UTC](https://discuss.elastic.co/t/time-date-logic-in-logstash-conf/76824/1 "2017-02-28T16:31:03Z")

</div>

Can I do any timestamp/date logic in the logstash configuration to make logstash have a cutoff date so it only sends events that happened after a certain date?

Something like this:  
if [@timestamp] \> "2017-02-01T00:00:00.000Z" {  
}

Some data comes in with UNIX timestamps so those I could just do normal math on but other data comes in with human readable timestamps and there I would need to be able to do something like the above...

Thanks!

---

<div class="post-metadata">

### Author: ![Keeper-of-the-Keys](https://avatars.discourse-cdn.com/v4/letter/k/7bcc69/32.png) [@Keeper-of-the-Keys](https://discuss.elastic.co/u/Keeper-of-the-Keys)
#### Post date: [March 2, 2017, 1:39pm UTC](https://discuss.elastic.co/t/time-date-logic-in-logstash-conf/76824/2 "2017-03-02T13:39:57Z")

</div>

Anyone?

Should I be submitting this as a feature request?

Logically the date plugin might be the right place with the right capabilities to handle this....

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [March 3, 2017, 2:42am UTC](https://discuss.elastic.co/t/time-date-logic-in-logstash-conf/76824/3 "2017-03-03T02:42:38Z")

</div>

Sounds like a great FR! 🙂

---

<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: [March 31, 2017, 2:43am UTC](https://discuss.elastic.co/t/time-date-logic-in-logstash-conf/76824/4 "2017-03-31T02:43:01Z")

</div>

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