# How to date match "January 16th 2019, 07:00:09.257"?

**URL:** <https://discuss.elastic.co/t/how-to-date-match-january-16th-2019-0709-257/164463>\
**Category:** Logstash\
**Created:** [January 16, 2019, 12:31pm UTC](https://discuss.elastic.co/t/how-to-date-match-january-16th-2019-0709-257/164463 "2019-01-16T12:31:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JimP](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@JimP](https://discuss.elastic.co/u/JimP)\
**Post date:** [January 16, 2019, 12:31pm UTC](https://discuss.elastic.co/t/how-to-date-match-january-16th-2019-0709-257/164463/1 "2019-01-16T12:31:54Z")

</div>

This should be easy, but for some reason I am unable to do this. Can someone help, please?

January 16th 2019, 07:00:09.257

Logstash 6.3.2

---

<div class="post-metadata">

**Author:** ![Shaoranlaos](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@Shaoranlaos](https://discuss.elastic.co/u/Shaoranlaos)\
**Post date:** [January 16, 2019, 1:54pm UTC](https://discuss.elastic.co/t/how-to-date-match-january-16th-2019-0709-257/164463/2 "2019-01-16T13:54:53Z")

</div>

where do you which a match? in the date filter or in grok?

if it is the date filter there is a previous question with an untested solution

> [@Need a date parser for my custom date fielsd](https://discuss.elastic.co/t/need-a-date-parser-for-my-custom-date-fielsd/39390/2):
>
> You probably need to strip away the "th" (and "nd" and "st") that can come after the day as the date filter isn't capable of ignoring it automatically. Or, specify multiple date patterns and let the filter try them all until it gets a match. Untested: date { match =\> ["name-of-your-field", "MMM dd'th' yyyy, HH:mm:ss.SSS", "MMM dd'nd' yyyy, HH:mm:ss.SSS", "MMM dd'st' yyyy, HH:mm:ss.SSS"] locale =\> "en" }

---

<div class="post-metadata">

**Author:** ![JimP](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@JimP](https://discuss.elastic.co/u/JimP)\
**Post date:** [January 16, 2019, 2:09pm UTC](https://discuss.elastic.co/t/how-to-date-match-january-16th-2019-0709-257/164463/3 "2019-01-16T14:09:23Z")

</div>

> [@Shaoranlaos](#):
>
> date { match =\> ["name-of-your-field", "MMM dd'th' yyyy, HH:mm:ss.SSS", "MMM dd'nd' yyyy, HH:mm:ss.SSS", "MMM dd'st' yyyy, HH:mm:ss.SSS"] locale =\> "en" }

Yes, like you have in the match, however, MMM is for Jan, would MMMM be for January?

---

<div class="post-metadata">

**Author:** ![JimP](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@JimP](https://discuss.elastic.co/u/JimP)\
**Post date:** [January 16, 2019, 2:26pm UTC](https://discuss.elastic.co/t/how-to-date-match-january-16th-2019-0709-257/164463/4 "2019-01-16T14:26:45Z")

</div>

It worked with four digit MMMM. 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:** [February 13, 2019, 2:26pm UTC](https://discuss.elastic.co/t/how-to-date-match-january-16th-2019-0709-257/164463/5 "2019-02-13T14:26:48Z")

</div>

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