# Date Filter from DD/MMM/YYYY:hh:MM:ss to @timestamp not working

**URL:** <https://discuss.elastic.co/t/date-filter-from-dd-mmm-yyyymm-ss-to-timestamp-not-working/135007>\
**Category:** Logstash\
**Created:** [June 7, 2018, 1:57pm UTC](https://discuss.elastic.co/t/date-filter-from-dd-mmm-yyyymm-ss-to-timestamp-not-working/135007 "2018-06-07T13:57:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nareshreddyp](https://avatars.discourse-cdn.com/v4/letter/n/e56c9b/32.png) [@nareshreddyp](https://discuss.elastic.co/u/nareshreddyp)\
**Post date:** [June 7, 2018, 1:57pm UTC](https://discuss.elastic.co/t/date-filter-from-dd-mmm-yyyymm-ss-to-timestamp-not-working/135007/1 "2018-06-07T13:57:04Z")

</div>

I want to match the date and timestamp from the log file. Date from my logfile is below

07/Jun/2018:04:35:00.458

I have used grok filter to extract the information using  
(?%{MONTHDAY}/%{MONTH}/%{YEAR}:%{HOUR}:%{MINUTE}:%{SECOND})

Logstash output also showing correctly.

"mytimestamp" =\> "07/Jun/2018:04:35:02.290",

But i am unable to set that date to the @timestamp. I have tried with the following

date  
{  
match =\> ["mytimestamp","dd/MMM/YYYY:HH:mm:ss"]  
}

also

date  
{  
match =\> ["mytimestamp","dd/MMM/YYYY:HH:mm:ss.SSS"]  
}

It is not working. Please help.

Thank you.  
Regards,  
Naresh Reddy

---

<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:** [June 7, 2018, 3:16pm UTC](https://discuss.elastic.co/t/date-filter-from-dd-mmm-yyyymm-ss-to-timestamp-not-working/135007/2 "2018-06-07T15:16:20Z")

</div>

> [@nareshreddyp](#):
>
> It is not working. Please help.

yyyy should be lowercase. Try "dd/MMM/yyyy:HH:mm:ss.SSS"

---

<div class="post-metadata">

**Author:** ![nareshreddyp](https://avatars.discourse-cdn.com/v4/letter/n/e56c9b/32.png) [@nareshreddyp](https://discuss.elastic.co/u/nareshreddyp)\
**Post date:** [June 7, 2018, 3:39pm UTC](https://discuss.elastic.co/t/date-filter-from-dd-mmm-yyyymm-ss-to-timestamp-not-working/135007/3 "2018-06-07T15:39:24Z")

</div>

Thank you. It worked.

---

<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 5, 2018, 3:39pm UTC](https://discuss.elastic.co/t/date-filter-from-dd-mmm-yyyymm-ss-to-timestamp-not-working/135007/4 "2018-07-05T15:39:25Z")

</div>

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