# Error when DATESTAMP pattern is used to parse the log\_timestamp

**URL:** <https://discuss.elastic.co/t/error-when-datestamp-pattern-is-used-to-parse-the-log-timestamp/77845>\
**Category:** Logstash\
**Created:** [March 8, 2017, 3:46pm UTC](https://discuss.elastic.co/t/error-when-datestamp-pattern-is-used-to-parse-the-log-timestamp/77845 "2017-03-08T15:46:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![harshavardan25000](https://avatars.discourse-cdn.com/v4/letter/h/c4cdca/32.png) [@harshavardan25000](https://discuss.elastic.co/u/harshavardan25000)\
**Post date:** [March 8, 2017, 3:46pm UTC](https://discuss.elastic.co/t/error-when-datestamp-pattern-is-used-to-parse-the-log-timestamp/77845/1 "2017-03-08T15:46:49Z")

</div>

The timestamp looks like "2017-02-06 04:01:12,757" and the pattern I chose is %{DATESTAMP:timestamp}.

But when the parsing occurs , the timestamp is converted as 0017-02-06T10:42:24.923Z and it is causing issues while creating timestamp based indexing "logstash-0017.02.06"

Can anyone assist me in identifying the correct pattern or am I using it wrong?

Thanks,  
Harsha

---

<div class="post-metadata">

**Author:** ![harshavardan25000](https://avatars.discourse-cdn.com/v4/letter/h/c4cdca/32.png) [@harshavardan25000](https://discuss.elastic.co/u/harshavardan25000)\
**Post date:** [March 8, 2017, 4:13pm UTC](https://discuss.elastic.co/t/error-when-datestamp-pattern-is-used-to-parse-the-log-timestamp/77845/2 "2017-03-08T16:13:35Z")

</div>

I solved it . I tried TIMESTAMP\_ISO8601 and worked well.

Thanks

---

<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:** [April 5, 2017, 4:14pm UTC](https://discuss.elastic.co/t/error-when-datestamp-pattern-is-used-to-parse-the-log-timestamp/77845/3 "2017-04-05T16:14:14Z")

</div>

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