# Inconsistent date matching pattern: "M/d/yyyy h:mm:ss a"

**URL:** <https://discuss.elastic.co/t/inconsistent-date-matching-pattern-m-d-yyyy-hss-a/183394>\
**Category:** Logstash\
**Created:** [May 29, 2019, 5:13pm UTC](https://discuss.elastic.co/t/inconsistent-date-matching-pattern-m-d-yyyy-hss-a/183394 "2019-05-29T17:13:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rlwmmw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rlwmmw/32/47099_2.png) [@rlwmmw](https://discuss.elastic.co/u/rlwmmw)\
**Post date:** [May 29, 2019, 5:13pm UTC](https://discuss.elastic.co/t/inconsistent-date-matching-pattern-m-d-yyyy-hss-a/183394/1 "2019-05-29T17:13:43Z")

</div>

Scratching my head with this one...  
Note: It does not appear to be the space issue that sometimes plagues single-digit fields.

Any ideas?

Ubuntu 16.04.6 LTS  
logstash 7.1.0  
openjdk version "1.8.0\_212-ojdkbuild"  
OpenJDK Runtime Environment (build 1.8.0\_212-ojdkbuild-04)  
OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)

config snippet:  
date {  
match =\> ["Timestamp", "M/d/yyyy h:mm:ss a"]  
timezone =\> "America/Chicago"  
}

Result:  
DOES MATCH  
"Timestamp": "5/4/2019 11:56:21 PM"  
"Timestamp": "5/4/2019 9:06:20 PM"  
"Timestamp": "5/4/2019 10:36:19 AM"

DOES NOT MATCH  
"Timestamp": "3/10/2019 2:55:12 AM"  
"Timestamp": "3/10/2019 2:35:12 AM"

---

<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 29, 2019, 5:22pm UTC](https://discuss.elastic.co/t/inconsistent-date-matching-pattern-m-d-yyyy-hss-a/183394/2 "2019-05-29T17:22:13Z")

</div>

> [@rlwmmw](#):
>
> "Timestamp": "3/10/2019 2:55:12 AM"  
> "Timestamp": "3/10/2019 2:35:12 AM"

Those are not valid timestamps. On March 10th the US went straight from 1:59:59 to 3:00:00.

---

<div class="post-metadata">

**Author:** ![rlwmmw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rlwmmw/32/47099_2.png) [@rlwmmw](https://discuss.elastic.co/u/rlwmmw)\
**Post date:** [May 30, 2019, 4:59pm UTC](https://discuss.elastic.co/t/inconsistent-date-matching-pattern-m-d-yyyy-hss-a/183394/3 "2019-05-30T16:59:23Z")

</div>

Well, That's good to know. I guess the source is wrong. Thanks for the info. I figure out how best to address it at ingest. Thanks again.

---

<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 27, 2019, 4:59pm UTC](https://discuss.elastic.co/t/inconsistent-date-matching-pattern-m-d-yyyy-hss-a/183394/4 "2019-06-27T16:59:25Z")

</div>

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