# How to parse @timestamp field using HTTPDERROR\_DATE pattern?

**URL:** <https://discuss.elastic.co/t/how-to-parse-timestamp-field-using-httpderror-date-pattern/64754>\
**Category:** Logstash\
**Created:** [November 2, 2016, 5:49pm UTC](https://discuss.elastic.co/t/how-to-parse-timestamp-field-using-httpderror-date-pattern/64754 "2016-11-02T17:49:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vitorlui](https://avatars.discourse-cdn.com/v4/letter/v/6f9a4e/32.png) [@vitorlui](https://discuss.elastic.co/u/vitorlui)\
**Post date:** [November 2, 2016, 5:49pm UTC](https://discuss.elastic.co/t/how-to-parse-timestamp-field-using-httpderror-date-pattern/64754/1 "2016-11-02T17:49:15Z")

</div>

I am trying to parse the timestamp from my log but my filter doesn't parse properly:

My log file has this pattern:

> [Sun Oct 30 17:16:09 2016] [TRACE\_HIGH] [TEST1] MessageTest1  
> [Sun Oct 30 17:16:10 2016] [TRACE\_HIGH] [TEST2] MessageTest2

My Filter:

> filter {  
> if [type] == "mycustomlog" {  
> grok {  
> match =\> { "message" =\> "\A[%{HTTPDERROR\_DATE:timestamp}]%{SPACE}(?(.|\r|\n)\*).(\n))"}  
> }  
> date {  
> # Format: Wed Jan 13 11:50:44.327650 2016 (GROK: HTTPDERROR\_DATE)  
> match =\> ["timestamp", "EEE MMM dd HH:mm:ss yyyy"]  
> }  
> multiline {  
> pattern =\> "^%{SYSLOG5424SD}%{SPACE}"  
> what =\> "previous"  
> negate=\> true  
> }  
> }  
> }

I am trying to use my datetime log into @timestamp field, but I  
cannot parse this format into @timestamp. Why the date filter did not  
replace the @timestamp value?

Related:

> <https://stackoverflow.com/questions/40385107/logstash-grok-how-to-parse-timestamp-field-using-httpderror-date-pattern>

date-pattern

---

<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:** [November 3, 2016, 6:46am UTC](https://discuss.elastic.co/t/how-to-parse-timestamp-field-using-httpderror-date-pattern/64754/2 "2016-11-03T06:46:05Z")

</div>

Look in your log file. If the date filter can't parse a date it'll log clues about what it doesn't like.

---

<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:31am UTC](https://discuss.elastic.co/t/how-to-parse-timestamp-field-using-httpderror-date-pattern/64754/3 "2017-07-06T04:31:21Z")

</div>


