# Logstash 8.0 @timestamp with nanoseconds precision

**URL:** https://discuss.elastic.co/t/logstash-8-0-timestamp-with-nanoseconds-precision/294910
**Category:** Logstash
**Created:** [January 20, 2022, 8:41am UTC](https://discuss.elastic.co/t/logstash-8-0-timestamp-with-nanoseconds-precision/294910 "2022-01-20T08:41:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ale\_ve](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ale_ve/32/100073_2.png) [@ale\_ve](https://discuss.elastic.co/u/ale_ve)
#### Post date: [January 20, 2022, 8:41am UTC](https://discuss.elastic.co/t/logstash-8-0-timestamp-with-nanoseconds-precision/294910/1 "2022-01-20T08:41:42Z")

</div>

Hi,  
I'd need help to understand how to set the @timestamp field with the content of another field that contains date and time with nanoseconds precision. I've tried to use the date match but it's not clear to me which pattern must be used for the scope:

```auto
  date {
    match => ["timestamp_nano", "ISO8601"]
	target => "@timestamp"
  }

```

where **timestamp\_nano** is timestamp with nanoseconds precision (e.g. **"2022-01-20T12:00:00.123456789Z"** ).  
By using **ISO8601** there is a milliseconds precision and the rest of the digit are not reported in the @timestamp field.

Which is the pattern to be used in the match?

Thanks in advance  
BRs, ale

---

<div class="post-metadata">

### Author: ![ale\_ve](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ale_ve/32/100073_2.png) [@ale\_ve](https://discuss.elastic.co/u/ale_ve)
#### Post date: [January 21, 2022, 4:29pm UTC](https://discuss.elastic.co/t/logstash-8-0-timestamp-with-nanoseconds-precision/294910/2 "2022-01-21T16:29:01Z")

</div>

Hi,  
I got the same result by adding a pipeline in Elasticsearch:

```auto
{
        "description": "mypipeline",
        "processors": [
            {
                "date": {
                    "field": "timestamp_nano",
                    "formats": ["ISO8601"],
                    "output_format": "yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSSZ"
                }
            }
        ]
}

```

The **timestamp\_nano** includes a timestamp with nanoseconds precision.  
BRs

---

<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: [February 18, 2022, 4:29pm UTC](https://discuss.elastic.co/t/logstash-8-0-timestamp-with-nanoseconds-precision/294910/3 "2022-02-18T16:29:48Z")

</div>

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