# How to use range query about date that amass data through logstash?

**URL:** <https://discuss.elastic.co/t/how-to-use-range-query-about-date-that-amass-data-through-logstash/49288>\
**Category:** Elasticsearch\
**Created:** [May 5, 2016, 12:08pm UTC](https://discuss.elastic.co/t/how-to-use-range-query-about-date-that-amass-data-through-logstash/49288 "2016-05-05T12:08:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![logstash](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@logstash](https://discuss.elastic.co/u/logstash)\
**Post date:** [May 5, 2016, 12:08pm UTC](https://discuss.elastic.co/t/how-to-use-range-query-about-date-that-amass-data-through-logstash/49288/1 "2016-05-05T12:08:18Z")

</div>

hi~

my logstash conf and used elasticsearch query  
what am i wrong??

absolutely, i have data in below example range...

if yymmddhhmmss's type is String, how to change type.......

# logstash conf

filter csv  
{yymmddhhmmss, type, path, host, ip}

output elasticsearch

# query to search elasticsearch

"query":{  
"filtered":{  
"filter":{  
"and":[{  
"range":{  
"yymmddhhmmss":{  
"lte":"2016-05-30 00:00:00",  
"gte":"2016-04-30 00:00:00",  
"format":"yyyy-MM-dd HH:mm:ss"  
}  
}  
}]  
}  
}  
}

---

<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:** [May 6, 2016, 12:14am UTC](https://discuss.elastic.co/t/how-to-use-range-query-about-date-that-amass-data-through-logstash/49288/2 "2016-05-06T00:14:21Z")

</div>

It's not clear what your problem is here, can you please clarify?

---

<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 5, 2017, 10:53pm UTC](https://discuss.elastic.co/t/how-to-use-range-query-about-date-that-amass-data-through-logstash/49288/3 "2017-07-05T22:53:30Z")

</div>


