# Grok pattern for date format

**URL:** <https://discuss.elastic.co/t/grok-pattern-for-date-format/302923>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 21, 2022, 2:09pm UTC](https://discuss.elastic.co/t/grok-pattern-for-date-format/302923 "2022-04-21T14:09:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Garry](https://avatars.discourse-cdn.com/v4/letter/g/bb73d2/32.png) [@Garry](https://discuss.elastic.co/u/Garry)\
**Post date:** [April 21, 2022, 2:09pm UTC](https://discuss.elastic.co/t/grok-pattern-for-date-format/302923/1 "2022-04-21T14:09:11Z")

</div>

Hi, I am looking to ingest a custom set of logs and i need some help with a grok date format.  
I would like to convert the following date as the timestamp

19 April 2022 15:38:20

Any help would be appreciated. I have been testing using the Grok Debugger, but hitting a bit of a wall.

Any ideas?

---

<div class="post-metadata">

**Author:** ![ibra\_013](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ibra_013/32/104827_2.png) [@ibra\_013](https://discuss.elastic.co/u/ibra_013)\
**Post date:** [May 2, 2022, 9:26pm UTC](https://discuss.elastic.co/t/grok-pattern-for-date-format/302923/2 "2022-05-02T21:26:39Z")

</div>

Hi ,

did you try this custom pattern,

```auto
TimeStamp %{MONTHDAY} %{MONTH} %{YEAR} %{TIME}

```

and the pattern is

```auto
%{TimeStamp:timestamp}

```

---

<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:** [May 30, 2022, 11:26pm UTC](https://discuss.elastic.co/t/grok-pattern-for-date-format/302923/3 "2022-05-30T23:26:57Z")

</div>

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