# Elasticsearch Date Processor not parsing properly

**URL:** https://discuss.elastic.co/t/elasticsearch-date-processor-not-parsing-properly/204612
**Category:** Elasticsearch
**Created:** [October 22, 2019, 9:24am UTC](https://discuss.elastic.co/t/elasticsearch-date-processor-not-parsing-properly/204612 "2019-10-22T09:24:48Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![gerard1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gerard1/32/53507_2.png) [@gerard1](https://discuss.elastic.co/u/gerard1)
#### Post date: [October 22, 2019, 9:24am UTC](https://discuss.elastic.co/t/elasticsearch-date-processor-not-parsing-properly/204612/1 "2019-10-22T09:24:49Z")

</div>

I'm trying to parse a log date with an Elasticsearch ingest pipeline, using date processor, but the parsed date is not correct.  
All the other pipelines that I've created work correctly, except this one.

Here is what I'm using:

**Raw log date:** `Tue Oct 22 10:58:00.645020 2019`  
**Processor:**  
`"date": { "field": "log.time", "target_field": "@timestamp", "formats": ["EEE MMM dd H:m:s.SSSSSS yyyy"] }`  
**Result:** `2019-10-22T00:00:00.000Z`

The date shown in the `log.time` field is correct (`Tue Oct 22 10:58:00.645020 2019`)

I've also tried the following format, without success: `EEE MMM dd HH:mm:ss.SSSSSS yyyy`

---

<div class="post-metadata">

### Author: ![Glen\_Smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/glen_smith/32/111656_2.png) [@Glen\_Smith](https://discuss.elastic.co/u/Glen_Smith)
#### Post date: [October 23, 2019, 4:21am UTC](https://discuss.elastic.co/t/elasticsearch-date-processor-not-parsing-properly/204612/2 "2019-10-23T04:21:27Z")

</div>

Maybe instead of `S` (fraction-of-second), try `n` (nano-of-second).

---

<div class="post-metadata">

### Author: ![gerard1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gerard1/32/53507_2.png) [@gerard1](https://discuss.elastic.co/u/gerard1)
#### Post date: [October 23, 2019, 6:59am UTC](https://discuss.elastic.co/t/elasticsearch-date-processor-not-parsing-properly/204612/3 "2019-10-23T06:59:35Z")

</div>

Doesn't work neither.

---

<div class="post-metadata">

### Author: ![gerard1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gerard1/32/53507_2.png) [@gerard1](https://discuss.elastic.co/u/gerard1)
#### Post date: [October 23, 2019, 7:05am UTC](https://discuss.elastic.co/t/elasticsearch-date-processor-not-parsing-properly/204612/4 "2019-10-23T07:05:28Z")

</div>

Apparently, I was looking at the wrong timestamp field (ingest one)...

Using `EEE MMM dd H:m:s.SSSSSS yyyy` works.

---

<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: [November 20, 2019, 7:05am UTC](https://discuss.elastic.co/t/elasticsearch-date-processor-not-parsing-properly/204612/5 "2019-11-20T07:05:28Z")

</div>

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