# Using %{MONTHDAY:MONTHDAY}-%{MONTH:MONTH}-%{YEAR:YEAR} %{HOUR:HOUR}:%{MINUTE:MINUTE}

**URL:** https://discuss.elastic.co/t/using-monthday-monthday-month-month-year-year-hour-hour-minute-minute/236658
**Category:** Logstash
**Created:** [June 11, 2020, 9:14am UTC](https://discuss.elastic.co/t/using-monthday-monthday-month-month-year-year-hour-hour-minute-minute/236658 "2020-06-11T09:14:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Burga](https://avatars.discourse-cdn.com/v4/letter/b/9d8465/32.png) [@Burga](https://discuss.elastic.co/u/Burga)
#### Post date: [June 11, 2020, 9:14am UTC](https://discuss.elastic.co/t/using-monthday-monthday-month-month-year-year-hour-hour-minute-minute/236658/1 "2020-06-11T09:14:28Z")

</div>

Hi ,

in my grok I'm parsing date column :

```auto
match => { "message" => "%{MONTHDAY:MONTHDAY}-%{MONTH:MONTH}-%{YEAR:YEAR} %{HOUR:HOUR}:%{MINUTE:MINUTE}:%{SECOND:SECOND}%{SPACE} %{DATA:loglevel}%{SPACE} \[%{DATA:thread}\]%{GREEDYDATA:message}"}

mutate {
        add_field =>
      {
          "date_created" => "%{MONTHDAY}/%{MONTH}/%{YEAR} %{HOUR}:%{MINUTE}:%{SECOND}"
      }
      }

```

and instead of getting the message date from the log , I'm getting the creation date in the output file :

```auto
 "date_created" => 2020-06-11T08:26:09.707Z,
       "@metadata" => {
             "index" => "catal_log",
              "beat" => "filebeat",
        "ip_address" => "192.168.141.222",
           "version" => "6.8.10",
              "type" => "doc"
    },
      "prospector" => {
        "type" => "log"
    },

```

Can you please give me a clue what is wrong ?

Best Regards.

---

<div class="post-metadata">

### Author: ![Jenni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jenni/32/29684_2.png) [@Jenni](https://discuss.elastic.co/u/Jenni)
#### Post date: [June 11, 2020, 11:46am UTC](https://discuss.elastic.co/t/using-monthday-monthday-month-month-year-year-hour-hour-minute-minute/236658/2 "2020-06-11T11:46:07Z")

</div>

When you post the configuration and the output, it would make sense to post the input data as well. Otherwise that's pretty difficult to debug, isn't it? And maybe more of the Logstash configuration would be helpful too because right now I don't understand where that `date_created` as a Timestamp object in your output is coming from.

---

<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: [July 9, 2020, 11:46am UTC](https://discuss.elastic.co/t/using-monthday-monthday-month-month-year-year-hour-hour-minute-minute/236658/3 "2020-07-09T11:46:07Z")

</div>

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