# How to parse this date format and target it to @timestamp

**URL:** <https://discuss.elastic.co/t/how-to-parse-this-date-format-and-target-it-to-timestamp/56021>\
**Category:** Logstash\
**Created:** [July 20, 2016, 7:36pm UTC](https://discuss.elastic.co/t/how-to-parse-this-date-format-and-target-it-to-timestamp/56021 "2016-07-20T19:36:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sridhar\_Yadav\_Manoha](https://avatars.discourse-cdn.com/v4/letter/s/c6cbf5/32.png) [@Sridhar\_Yadav\_Manoha](https://discuss.elastic.co/u/Sridhar_Yadav_Manoha)\
**Post date:** [July 20, 2016, 7:36pm UTC](https://discuss.elastic.co/t/how-to-parse-this-date-format-and-target-it-to-timestamp/56021/1 "2016-07-20T19:36:02Z")

</div>

How to parse this date format and target it to @timestamp : 19/Jul/2016:17:39:02

---

<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:** [July 20, 2016, 8:31pm UTC](https://discuss.elastic.co/t/how-to-parse-this-date-format-and-target-it-to-timestamp/56021/2 "2016-07-20T20:31:11Z")

</div>

```
dd/MMM/yyyy:HH:mm:ss

```

It looks like you're processing an HTTP log. Have a look at the first example at [https://www.elastic.co/guide/en/logstash/current/config-examples.html](https://www.elastic.co/guide/en/logstash/current/config-examples.html).

---

<div class="post-metadata">

**Author:** ![Sridhar\_Yadav\_Manoha](https://avatars.discourse-cdn.com/v4/letter/s/c6cbf5/32.png) [@Sridhar\_Yadav\_Manoha](https://discuss.elastic.co/u/Sridhar_Yadav_Manoha)\
**Post date:** [July 20, 2016, 8:33pm UTC](https://discuss.elastic.co/t/how-to-parse-this-date-format-and-target-it-to-timestamp/56021/3 "2016-07-20T20:33:54Z")

</div>

date {  
match =\> ["Start\_Time", "dd/MMM/yyyy:HH:mm:ss"]  
target =\> "@timestamp"  
}

Currently I'm using this configuration.

I'm getting Invalid Format : "19/Jul/2016:17:39:02" is malformed at "/Jul/2016:17:39:02"

---

<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:** [July 21, 2016, 6:00pm UTC](https://discuss.elastic.co/t/how-to-parse-this-date-format-and-target-it-to-timestamp/56021/4 "2016-07-21T18:00:34Z")

</div>

Works fine here:

```nohighlight
$ cat test.config
input { stdin { } }
output { stdout { codec => rubydebug } }
filter {
  date {
    match => ["message", "dd/MMM/yyyy:HH:mm:ss"]
  }
}
$ echo '19/Jul/2016:17:39:02' | /opt/logstash/bin/logstash -f test.config
Settings: Default pipeline workers: 2
Pipeline main started
{
       "message" => "19/Jul/2016:17:39:02",
      "@version" => "1",
    "@timestamp" => "2016-07-19T15:39:02.000Z",
          "host" => "hallonet"
}
Pipeline main has been shutdown
stopping pipeline {:id=>"main"}

```

---

<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:47am UTC](https://discuss.elastic.co/t/how-to-parse-this-date-format-and-target-it-to-timestamp/56021/5 "2017-07-06T04:47:00Z")

</div>


