# Parsing error in date format

**URL:** <https://discuss.elastic.co/t/parsing-error-in-date-format/333466>\
**Category:** Logstash\
**Created:** [May 15, 2023, 1:39pm UTC](https://discuss.elastic.co/t/parsing-error-in-date-format/333466 "2023-05-15T13:39:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sachchan](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@Sachchan](https://discuss.elastic.co/u/Sachchan)\
**Post date:** [May 15, 2023, 1:39pm UTC](https://discuss.elastic.co/t/parsing-error-in-date-format/333466/1 "2023-05-15T13:39:12Z")

</div>

Hi Team

getting below error in parsing the date in logstash. Kindly suggest how this can be resolved.

```auto
"error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse field [ResponseTime] of type [date] in document with id '32KUH4gB96hGxKLH90gP'. Preview of field's value: '15/05/2023 18:52:60.000'", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"failed to parse date field [15/05/2023 18:52:60.000] with format [strict_date_optional_time||epoch_millis]", "caused_by"=>{"type"=>"date_time_parse_exception", "reason"=>"Failed to parse with all enclosed parsers"}}}

```

Below is the config for conversion

```auto
    date {

        match => ["RequestTime", "dd/MM/yyyy HH:mm:ss.SSS"]

        target => "RequestTime"

    }

    date {

        match => ["ResponseTime", "dd/MM/yyyy HH:mm:ss.SSS"]

        target => "ResponseTime"

    }

```

Each occurrence is at 000 millisecond and failing with above error.

---

<div class="post-metadata">

**Author:** ![Sachchan](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@Sachchan](https://discuss.elastic.co/u/Sachchan)\
**Post date:** [May 15, 2023, 2:02pm UTC](https://discuss.elastic.co/t/parsing-error-in-date-format/333466/2 "2023-05-15T14:02:47Z")

</div>

@Wolfram_Haussig please suggest here.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [May 15, 2023, 4:47pm UTC](https://discuss.elastic.co/t/parsing-error-in-date-format/333466/3 "2023-05-15T16:47:28Z")

</div>

> [@Sachchan](#):
>
> `'15/05/2023 18:52:60.000'`

18:52:60 with 60 seconds should have rolled over to 18:53:00 unless there was a leap second in that minute. A leap second would only occur at the end of the month, so that time appears to be invalid.

---

<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:** [June 12, 2023, 4:47pm UTC](https://discuss.elastic.co/t/parsing-error-in-date-format/333466/4 "2023-06-12T16:47:48Z")

</div>

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