# Timestamp discrepancy / Date Processor

**URL:** <https://discuss.elastic.co/t/timestamp-discrepancy-date-processor/154077>\
**Category:** Elasticsearch\
**Created:** [October 26, 2018, 1:34am UTC](https://discuss.elastic.co/t/timestamp-discrepancy-date-processor/154077 "2018-10-26T01:34:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lukes](https://avatars.discourse-cdn.com/v4/letter/l/4da419/32.png) [@lukes](https://discuss.elastic.co/u/lukes)\
**Post date:** [October 26, 2018, 1:34am UTC](https://discuss.elastic.co/t/timestamp-discrepancy-date-processor/154077/1 "2018-10-26T01:34:21Z")

</div>

Hi,

I am using date processor to parse and convert the date from a custom field which is string. Date processor parses the date correctly, but storing in @timestamp incorrectly. It parses AM/PM format correctly. But when storing in 24 hours Z format, it's not transforming correctly in 24 hr.

Date Processor

```
{
      "date" : {
        "field" : "msg.timestamp",
        "formats" : ["MMM dd, yyyy, HH:mm:ss,SSS a z"]
      }
 }

```

where  
`msg.timestamp value is "Oct 20, 2018, 6:59:38,772 PM UTC"`

and final @timestamp value out is below.

`"@timestamp": "2018-10-20T06:59:38.772Z",`

Am i missing anything ?

---

<div class="post-metadata">

**Author:** ![lukes](https://avatars.discourse-cdn.com/v4/letter/l/4da419/32.png) [@lukes](https://discuss.elastic.co/u/lukes)\
**Post date:** [October 26, 2018, 4:11am UTC](https://discuss.elastic.co/t/timestamp-discrepancy-date-processor/154077/2 "2018-10-26T04:11:33Z")

</div>

Can someone provide a feedback ?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 26, 2018, 12:15pm UTC](https://discuss.elastic.co/t/timestamp-discrepancy-date-processor/154077/3 "2018-10-26T12:15:24Z")

</div>

Please be aware that this is a community forum that does not come with any SLA on answers nor guarantees them - pinging on this thread after two hours is something I personally interpret as rather rude. If you need an SLA for your answers, you can get a subscription, see [https://www.elastic.co/subscriptions](https://www.elastic.co/subscriptions)

From a quick peek, I think you need to replace `HH` with the hour of halfday to make this work.

---

<div class="post-metadata">

**Author:** ![lukes](https://avatars.discourse-cdn.com/v4/letter/l/4da419/32.png) [@lukes](https://discuss.elastic.co/u/lukes)\
**Post date:** [October 26, 2018, 4:24pm UTC](https://discuss.elastic.co/t/timestamp-discrepancy-date-processor/154077/4 "2018-10-26T16:24:53Z")

</div>

Thanks a lot @spinscale. I agree, it's a community forum and i don't expect any SLA's. I just asked again, because sometimes i(atleast in my case) get the notification of question asked on the forum i am registered on, and then forget to reply it. But if someone asks again, i quickly go and reply(Because i forgot to reply inititally 🙂 ).

Appreciate your help, i'll give it a try.

---

<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 23, 2018, 4:24pm UTC](https://discuss.elastic.co/t/timestamp-discrepancy-date-processor/154077/5 "2018-11-23T16:24:57Z")

</div>

Closed on November 23, 2018, 4:24pm UTC

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