# Help converting the Date format in Logstash - 5.5.0

**URL:** <https://discuss.elastic.co/t/help-converting-the-date-format-in-logstash-5-5-0/101745>\
**Category:** Logstash\
**Created:** [September 25, 2017, 7:09pm UTC](https://discuss.elastic.co/t/help-converting-the-date-format-in-logstash-5-5-0/101745 "2017-09-25T19:09:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elkuserh](https://avatars.discourse-cdn.com/v4/letter/e/a9a28c/32.png) [@elkuserh](https://discuss.elastic.co/u/elkuserh)\
**Post date:** [September 25, 2017, 7:09pm UTC](https://discuss.elastic.co/t/help-converting-the-date-format-in-logstash-5-5-0/101745/1 "2017-09-25T19:09:06Z")

</div>

My input data has a date filed which has values such as this 🙂

2017-01-09-11.23.08.000000  
2017-04-10-22.10.11.000000

So I went with the following date filter:

```
date{ match => ["CREATEDTTM", "yyyy-mm-dd-HH.mm.ss.SSS"]
               target => "CREATEDTTM"
              }

```

I get a date parse failure.

As we have 6 '0's after the seconds value, do I have to provide 🙂  
date{ match =\> ["CREATEDTTM", "yyyy-mm-dd-HH.mm.ss.SSSSSS"]  
target =\> "CREATEDTTM"  
}  
OR  
date{ match =\> ["CREATEDTTM", "yyyy-mm-dd-HH.mm.ss.SSS000"]  
target =\> "CREATEDTTM"  
}

---

<div class="post-metadata">

**Author:** ![elkuserh](https://avatars.discourse-cdn.com/v4/letter/e/a9a28c/32.png) [@elkuserh](https://discuss.elastic.co/u/elkuserh)\
**Post date:** [September 26, 2017, 9:30am UTC](https://discuss.elastic.co/t/help-converting-the-date-format-in-logstash-5-5-0/101745/2 "2017-09-26T09:30:21Z")

</div>

Hi,

I managed to get past this issue with the following piece of code:

```
date{ match => ["CREATEDTTM", "yyyy-mm-dd-HH.mm.ss.SSSSSS"]
               target => "CREATEDTTM"
```

---

<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:** [October 24, 2017, 9:30am UTC](https://discuss.elastic.co/t/help-converting-the-date-format-in-logstash-5-5-0/101745/3 "2017-10-24T09:30:34Z")

</div>

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