# Can I get a date yesterday in logstash config?

**URL:** https://discuss.elastic.co/t/can-i-get-a-date-yesterday-in-logstash-config/209927
**Category:** Logstash
**Created:** [November 29, 2019, 6:28am UTC](https://discuss.elastic.co/t/can-i-get-a-date-yesterday-in-logstash-config/209927 "2019-11-29T06:28:09Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![deep2eye](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deep2eye/32/42767_2.png) [@deep2eye](https://discuss.elastic.co/u/deep2eye)
#### Post date: [November 29, 2019, 6:28am UTC](https://discuss.elastic.co/t/can-i-get-a-date-yesterday-in-logstash-config/209927/1 "2019-11-29T06:28:09Z")

</div>

Hello.  
Can I get a date yesterday in logstash config?  
How do I enter yesterday's date in the SQL statement? (???? mark)

input {  
jdbc {  
jdbc\_driver\_class =\> "com.mysql.jdbc.Driver"  
schedule =\> "0 \*/1 \* \* \*"  
statement =\> "SELECT a, b, c, reg\_date from gym\_user where reg\_date \> ????"  
use\_column\_value =\> true  
}  
}

---

<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: [December 27, 2019, 6:28am UTC](https://discuss.elastic.co/t/can-i-get-a-date-yesterday-in-logstash-config/209927/2 "2019-12-27T06:28:15Z")

</div>

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