# Extract timestamp from log message

**URL:** <https://discuss.elastic.co/t/extract-timestamp-from-log-message/140892>\
**Category:** Elasticsearch\
**Created:** [July 20, 2018, 12:57pm UTC](https://discuss.elastic.co/t/extract-timestamp-from-log-message/140892 "2018-07-20T12:57:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![g.myznikov.tinkoff](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/g.myznikov.tinkoff/32/33582_2.png) [@g.myznikov.tinkoff](https://discuss.elastic.co/u/g.myznikov.tinkoff)\
**Post date:** [July 20, 2018, 12:57pm UTC](https://discuss.elastic.co/t/extract-timestamp-from-log-message/140892/1 "2018-07-20T12:57:10Z")

</div>

I get log messages like this one:

```auto
Jul 20 14:15:29 ...
```

and I want to use grok filter (INGEST NODE in ElasticSearch) to extract timestamp (time and date) from this log in format like @timestamp (not string) . It necessary for me because I want to sort logs. Please, write down this filter.  
NOTE: This variant does not work:

```auto
%{TIMESTAMP_ISO8601: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:** [August 17, 2018, 12:57pm UTC](https://discuss.elastic.co/t/extract-timestamp-from-log-message/140892/2 "2018-08-17T12:57:11Z")

</div>

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