# Set custom @timestamp from fields not working

**URL:** <https://discuss.elastic.co/t/set-custom-timestamp-from-fields-not-working/256262>\
**Category:** Logstash\
**Created:** [November 22, 2020, 12:04pm UTC](https://discuss.elastic.co/t/set-custom-timestamp-from-fields-not-working/256262 "2020-11-22T12:04:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nino](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@nino](https://discuss.elastic.co/u/nino)\
**Post date:** [November 22, 2020, 12:04pm UTC](https://discuss.elastic.co/t/set-custom-timestamp-from-fields-not-working/256262/1 "2020-11-22T12:04:08Z")

</div>

Hello all,

i need help setting @timestamp from fields, why date plugin is not parsing my custom fill\_date correctly?

```
mutate {
    add_field => { "fill_date" => "%{FillDate} %{FillTime}" }
}

date {
    timezone => "UCT"
    match => ["fill_date", "yyyy-MM-dd HH:mm:ss.s"]
    target => "@timestamp"
}

```

### logstash output

```
{
     "FillDate" => "2020-11-10",
     "FillTime" => "10:30:33.286000",
     "fill_date" => "2020-11-10 10:30:33.286000",
     "@timestamp" => 2020-11-22T11:56:02.736Z
}
```

---

<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:** [November 22, 2020, 2:08pm UTC](https://discuss.elastic.co/t/set-custom-timestamp-from-fields-not-working/256262/2 "2020-11-22T14:08:06Z")

</div>

> [@nino](#):
>
> `"yyyy-MM-dd HH:mm:ss.s"`

Try "yyyy-MM-dd HH:mm:ss.SSSSSS"

---

<div class="post-metadata">

**Author:** ![nino](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@nino](https://discuss.elastic.co/u/nino)\
**Post date:** [November 22, 2020, 5:31pm UTC](https://discuss.elastic.co/t/set-custom-timestamp-from-fields-not-working/256262/3 "2020-11-22T17:31:48Z")

</div>

Thank you Badger!. I forgot to map every digit.

Regards

---

<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 20, 2020, 5:31pm UTC](https://discuss.elastic.co/t/set-custom-timestamp-from-fields-not-working/256262/4 "2020-12-20T17:31:55Z")

</div>

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