# How should I filter this date?

**URL:** <https://discuss.elastic.co/t/how-should-i-filter-this-date/281185>\
**Category:** Logstash\
**Created:** [August 12, 2021, 10:08am UTC](https://discuss.elastic.co/t/how-should-i-filter-this-date/281185 "2021-08-12T10:08:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AbelAlejandro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abelalejandro/32/92911_2.png) [@AbelAlejandro](https://discuss.elastic.co/u/AbelAlejandro)\
**Post date:** [August 12, 2021, 10:08am UTC](https://discuss.elastic.co/t/how-should-i-filter-this-date/281185/1 "2021-08-12T10:08:10Z")

</div>

My logs are TSVs that look like the following:

```auto
|timestamp_fmt|timestamp_ms|key|tictoc_ms|mem_jvm|mem_phy_os|tags|comment|
|---|---|---|---|---|---|---|---|
|2021-08-11T13-55-39.202|1628682939202|SCENARIO|TIC|4548715304|11172929536||Dashboard-SomeTest|
|2021-08-11T13-55-39.207|1628682939207|STEP|TIC|4548715304|11172954112||I login as 'admin'|

```

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/7/4774a380d1f14bd35c423a331be8136fccfaed8d.png)

But there's a T in my Date and I when I try to add that date format it is not correctly recognized by Elastic.

```auto
filter {
  grok {
    match => ["message", "%{DATA:timestamp} .*"]
  }
  date {
    match => ["timestamp", "HH:MM:ss.SSSZZZ"]
  }
}

```

---

<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:** [August 12, 2021, 3:16pm UTC](https://discuss.elastic.co/t/how-should-i-filter-this-date/281185/2 "2021-08-12T15:16:50Z")

</div>

> [@AbelAlejandro](#):
>
> `match => ["timestamp", "HH:MM:ss.SSSZZZ"]`

The pattern has to match every single character in the field it is trying to parse.

The grok makes no sense to me. It is not going to find a space to terminate the [timestamp] field until it gets to `I login as 'admin'`.

---

<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:** [September 9, 2021, 3:17pm UTC](https://discuss.elastic.co/t/how-should-i-filter-this-date/281185/3 "2021-09-09T15:17:21Z")

</div>

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