# Logstash 7.10 fails with date filter UNIX\_MS - failed to parse date field strict\_date\_optional\_time

**URL:** https://discuss.elastic.co/t/logstash-7-10-fails-with-date-filter-unix-ms-failed-to-parse-date-field-strict-date-optional-time/256583
**Category:** Logstash
**Created:** [November 24, 2020, 11:08pm UTC](https://discuss.elastic.co/t/logstash-7-10-fails-with-date-filter-unix-ms-failed-to-parse-date-field-strict-date-optional-time/256583 "2020-11-24T23:08:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dfrewin](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@dfrewin](https://discuss.elastic.co/u/dfrewin)
#### Post date: [November 24, 2020, 11:08pm UTC](https://discuss.elastic.co/t/logstash-7-10-fails-with-date-filter-unix-ms-failed-to-parse-date-field-strict-date-optional-time/256583/1 "2020-11-24T23:08:34Z")

</div>

Initially logstash was running when we were on 6.8 but as soon as we upgraded to 7.9.3 it started failing.

Using salesforce logstash plugin error msg retrieves the time value successfully, but looks to fail when sending to elastic search.

```auto
failed to parse date field [1.606245613433E12] with format [strict_date_optional_time||epoch_millis]", "caused_by"=>{"type"=>"date_time_parse_exception", "reason"=>"date_time_parse_exception: Failed to parse with all enclosed parsers"}}}}}}

```

logstash Conf file :

```auto
filter {
  date { tag_on_failure => []
   match => ["CreatedTimeStamp__c", "UNIX_MS"] }

  mutate {
      add_field => { "logtype" => "salesforce" }
      rename => { "Message__c" => "message" }
      rename => { "Level__c" => "loglevel" }
          remove_field => ["CreateTimeStamp__c"]
}

```

---

<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: [November 25, 2020, 12:14am UTC](https://discuss.elastic.co/t/logstash-7-10-fails-with-date-filter-unix-ms-failed-to-parse-date-field-strict-date-optional-time/256583/2 "2020-11-25T00:14:37Z")

</div>

> [@dfrewin](#):
>
> ```auto
> date { tag_on_failure => []
> match => ["CreatedTimeStamp__c", "UNIX_MS"] }
> 
> ```

I do not know what changed to stop it parsing the exponential format, but if you want to get it working again you can

```
 mutate { convert => { "CreatedTimeStamp__c" => "float" } }

```

so that you have

```
"CreatedTimeStamp__c" => 1606245613433.0

```

which the date filter will parse as 2020-11-24T19:20:13.433Z

---

<div class="post-metadata">

### Author: ![dfrewin](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@dfrewin](https://discuss.elastic.co/u/dfrewin)
#### Post date: [November 25, 2020, 6:55pm UTC](https://discuss.elastic.co/t/logstash-7-10-fails-with-date-filter-unix-ms-failed-to-parse-date-field-strict-date-optional-time/256583/3 "2020-11-25T18:55:59Z")

</div>

@Badger thank you for the response. I did as you said but it still was failing. I then piped the output to stdout to see what I as actually sending to elastic search. This revealed a bug in my configuration.

My remove statement had CreateTimeStamp\_\_c instead of CreatedTimeStamp\_\_c . Anyways you got me to the next step in my debugging. 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: [December 23, 2020, 6:56pm UTC](https://discuss.elastic.co/t/logstash-7-10-fails-with-date-filter-unix-ms-failed-to-parse-date-field-strict-date-optional-time/256583/4 "2020-12-23T18:56:08Z")

</div>

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