# Use Epoch Format with Nanoseconds (19 digits)

**URL:** https://discuss.elastic.co/t/use-epoch-format-with-nanoseconds-19-digits/360632
**Category:** Elasticsearch
**Created:** [May 31, 2024, 2:25pm UTC](https://discuss.elastic.co/t/use-epoch-format-with-nanoseconds-19-digits/360632 "2024-05-31T14:25:20Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![andre\_bx](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@andre\_bx](https://discuss.elastic.co/u/andre_bx)
#### Post date: [May 31, 2024, 2:25pm UTC](https://discuss.elastic.co/t/use-epoch-format-with-nanoseconds-19-digits/360632/1 "2024-05-31T14:25:20Z")

</div>

Hi,

i am beginner with elastic, but i would use elastic for our Bluecat DNS Server.

The Server send the time as Unix epoche format with 19 digits, so i checked it and it is in nanoseconds like google search told me.

I search and test something but i don´t find the correct settings for type and format.

Is it possible to use the 19 digit epoch format with elastic?

 ![Unbenannt2](https://us1.discourse-cdn.com/elastic/original/3X/3/3/334dbad8b34d7056f9095ad1ef9f9183b0388381.png)

Regardes Andre

---

<div class="post-metadata">

### Author: ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)
#### Post date: [June 2, 2024, 9:29pm UTC](https://discuss.elastic.co/t/use-epoch-format-with-nanoseconds-19-digits/360632/2 "2024-06-02T21:29:27Z")

</div>

Hi @andre_bx

Try use the[epoch formats](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html#built-in-date-formats):

```auto
PUT idx_test
{
  "mappings": {
    "properties": {
      "time": {
        "type": "date",
        "format": "epoch_millis"
      }
    }
  }
}

POST idx_test/_doc/1
{
  "time":"1710335200000000000"
}

```

---

<div class="post-metadata">

### Author: ![andre\_bx](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@andre\_bx](https://discuss.elastic.co/u/andre_bx)
#### Post date: [June 5, 2024, 2:22pm UTC](https://discuss.elastic.co/t/use-epoch-format-with-nanoseconds-19-digits/360632/3 "2024-06-05T14:22:52Z")

</div>

@RabBit_BR thx for your response and idea!

I can insert the timestamp but it has wrong format if i take a look in the document (picture below).

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

Regardes
