# How to convert string to date in logstash

**URL:** <https://discuss.elastic.co/t/how-to-convert-string-to-date-in-logstash/57914>\
**Category:** Logstash\
**Created:** [August 12, 2016, 11:02am UTC](https://discuss.elastic.co/t/how-to-convert-string-to-date-in-logstash/57914 "2016-08-12T11:02:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ganesh2303](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Ganesh2303](https://discuss.elastic.co/u/Ganesh2303)\
**Post date:** [August 12, 2016, 11:02am UTC](https://discuss.elastic.co/t/how-to-convert-string-to-date-in-logstash/57914/1 "2016-08-12T11:02:10Z")

</div>

HI,  
I want to convert my string field into date field how could i perform that in logstash coding.

---

<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:** [August 12, 2016, 11:24am UTC](https://discuss.elastic.co/t/how-to-convert-string-to-date-in-logstash/57914/2 "2016-08-12T11:24:00Z")

</div>

You can use the date filter to parse a timestamp. Are you sending the events to Elasticsearch? If so, what really matters is the mapping in the index you're writing to.

---

<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 6, 2017, 4:43am UTC](https://discuss.elastic.co/t/how-to-convert-string-to-date-in-logstash/57914/3 "2017-07-06T04:43:42Z")

</div>


