# What is the date format to be used with Logstash to match 9 digits millisecond

**URL:** <https://discuss.elastic.co/t/what-is-the-date-format-to-be-used-with-logstash-to-match-9-digits-millisecond/107032>\
**Category:** Logstash\
**Created:** [November 9, 2017, 11:29am UTC](https://discuss.elastic.co/t/what-is-the-date-format-to-be-used-with-logstash-to-match-9-digits-millisecond/107032 "2017-11-09T11:29:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elasticheart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticheart/32/65189_2.png) [@elasticheart](https://discuss.elastic.co/u/elasticheart)\
**Post date:** [November 9, 2017, 11:29am UTC](https://discuss.elastic.co/t/what-is-the-date-format-to-be-used-with-logstash-to-match-9-digits-millisecond/107032/1 "2017-11-09T11:29:05Z")

</div>

Hi,

I am using Logstash 5.6.3. I have a date time field in my log entry like **07-11-17 13:35:35.656000000**. I would like to use it as my `@timestamp`, so that I am using date filter to `match` it and `target` to `@timestamp`. As you can see, the millisecond part has 9 digits. If it had 3 digits, I would be using the below format refering [this link](https://www.elastic.co/guide/en/logstash/current/plugins-filters-date.html#plugins-filters-date-match)

```
date {
    match => ["datefield", "dd-MM-yy HH:mm:ss.SSS"]
    target => "@timestamp"
}

```

Somebody kindly tell me how to match the filter to make use of 9 digits?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 9, 2017, 11:40am UTC](https://discuss.elastic.co/t/what-is-the-date-format-to-be-used-with-logstash-to-match-9-digits-millisecond/107032/2 "2017-11-09T11:40:04Z")

</div>

That timestamp has microsecond precision (9 decimals). Unfortunately timestamps in Elasticsearch only go down to milliseconds (3 decimals) so I do not think you will be able to accurately represent that full timestamp in Elasticsearch. You may need to parse out the last 6 decimals and put these into a separate field.

---

<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:** [December 7, 2017, 11:47am UTC](https://discuss.elastic.co/t/what-is-the-date-format-to-be-used-with-logstash-to-match-9-digits-millisecond/107032/4 "2017-12-07T11:47:20Z")

</div>

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