# How to parse this date pattern

**URL:** <https://discuss.elastic.co/t/how-to-parse-this-date-pattern/57491>\
**Category:** Logstash\
**Created:** [August 8, 2016, 3:19pm UTC](https://discuss.elastic.co/t/how-to-parse-this-date-pattern/57491 "2016-08-08T15:19:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fred\_Dionisio](https://avatars.discourse-cdn.com/v4/letter/f/f0a364/32.png) [@Fred\_Dionisio](https://discuss.elastic.co/u/Fred_Dionisio)\
**Post date:** [August 8, 2016, 3:19pm UTC](https://discuss.elastic.co/t/how-to-parse-this-date-pattern/57491/1 "2016-08-08T15:19:10Z")

</div>

I've the following XML

```
<lsfIndicatorEvent>
   <startDate>2016-08-08T13:40:00.000+01:00</startDate>
</lsfIndicatorEvent>

```

and inside the filter, have the multiline plugin and the xml as followed:

```
xml {
    source => "message"
    target ="xml_message"
    store_xml => false
    xpath => [
	"/lsfIndicatorEvent//dimension[1]/text()" , "layer",
        "/lsfIndicatorEvent//startdate/text()", "startDate"
        ]
}

```

I can get the layer and the startDate as strings, but now I can't convert that startDate to date without giving me, failed parsing date.

---

<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 10, 2016, 6:06am UTC](https://discuss.elastic.co/t/how-to-parse-this-date-pattern/57491/2 "2016-08-10T06:06:32Z")

</div>

Using a date filter with the ISO8601 pattern doesn't work? What error message do you get?

---

<div class="post-metadata">

**Author:** ![Fred\_Dionisio](https://avatars.discourse-cdn.com/v4/letter/f/f0a364/32.png) [@Fred\_Dionisio](https://discuss.elastic.co/u/Fred_Dionisio)\
**Post date:** [August 10, 2016, 9:57am UTC](https://discuss.elastic.co/t/how-to-parse-this-date-pattern/57491/3 "2016-08-10T09:57:41Z")

</div>

After many tries, it worked. Sorry for bothering.

---

<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:44am UTC](https://discuss.elastic.co/t/how-to-parse-this-date-pattern/57491/4 "2017-07-06T04:44:04Z")

</div>

Closed on July 6, 2017, 4:44am UTC


