# Logstash @timestamp replacement help

**URL:** <https://discuss.elastic.co/t/logstash-timestamp-replacement-help/231387>\
**Category:** Logstash\
**Created:** [May 6, 2020, 6:14pm UTC](https://discuss.elastic.co/t/logstash-timestamp-replacement-help/231387 "2020-05-06T18:14:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![clarkritchie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/clarkritchie/32/65755_2.png) [@clarkritchie](https://discuss.elastic.co/u/clarkritchie)\
**Post date:** [May 6, 2020, 6:14pm UTC](https://discuss.elastic.co/t/logstash-timestamp-replacement-help/231387/1 "2020-05-06T18:14:58Z")

</div>

Hi all,

Trying to replace @timestamp with:

```auto
mutate {
  add_field => { "log_time" => "%{year}-%{month}-%{day} %{time}" }
}
date {
  match => ["log_time", "yyyy-MM-dd HH:mm:ss"]
  target => "@timestamp"
}

```

I am seeing `log_time` in my docs OK -- `2020-05-06 17:45:56` -- but the @timestamp is still the ingest timestamp. Is there additional conversion/formatting necessary here? Surely I'm staring at something stupidly obvious? Thank you in advance.

---

<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:** [June 3, 2020, 6:15pm UTC](https://discuss.elastic.co/t/logstash-timestamp-replacement-help/231387/2 "2020-06-03T18:15:03Z")

</div>

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