# I want to add a date column to my logstash with a date i choose not a timestamp hellpp

**URL:** https://discuss.elastic.co/t/i-want-to-add-a-date-column-to-my-logstash-with-a-date-i-choose-not-a-timestamp-hellpp/220627
**Category:** Logstash
**Created:** [February 24, 2020, 10:44am UTC](https://discuss.elastic.co/t/i-want-to-add-a-date-column-to-my-logstash-with-a-date-i-choose-not-a-timestamp-hellpp/220627 "2020-02-24T10:44:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![samargh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samargh/32/70171_2.png) [@samargh](https://discuss.elastic.co/u/samargh)
#### Post date: [February 24, 2020, 10:44am UTC](https://discuss.elastic.co/t/i-want-to-add-a-date-column-to-my-logstash-with-a-date-i-choose-not-a-timestamp-hellpp/220627/1 "2020-02-24T10:44:14Z")

</div>

i need to add a new column to my logstash file  
i have to add a column that shows a date in all my lines exmpl : 2020-01-01  
i don't get it  
i tried this but it's not working  
date {  
match =\> ["DATE", "2020-01-01"]  
target =\> "DATE"  
}  
help me please it's urgent

---

<div class="post-metadata">

### Author: ![samargh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samargh/32/70171_2.png) [@samargh](https://discuss.elastic.co/u/samargh)
#### Post date: [February 24, 2020, 10:45am UTC](https://discuss.elastic.co/t/i-want-to-add-a-date-column-to-my-logstash-with-a-date-i-choose-not-a-timestamp-hellpp/220627/2 "2020-02-24T10:45:50Z")

</div>

i'm asked to add a column that specify one certain samae date for all my lines  
cuz i need to acess to that index with the date i specified

---

<div class="post-metadata">

### Author: ![Shaoranlaos](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@Shaoranlaos](https://discuss.elastic.co/u/Shaoranlaos)
#### Post date: [February 25, 2020, 7:50am UTC](https://discuss.elastic.co/t/i-want-to-add-a-date-column-to-my-logstash-with-a-date-i-choose-not-a-timestamp-hellpp/220627/3 "2020-02-25T07:50:42Z")

</div>

You could simply add a field DATE with the mutate filter (or any other filter) and than parse that added field with the date filter.

```auto
mutate {
  add_field => {
    "DATE" => "2020-01-01"
  }
}
date {
  match => ["DATE", "yyyy-MM-dd"]
  target => "DATE"
}

```

---

<div class="post-metadata">

### Author: ![samargh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samargh/32/70171_2.png) [@samargh](https://discuss.elastic.co/u/samargh)
#### Post date: [February 25, 2020, 11:25am UTC](https://discuss.elastic.co/t/i-want-to-add-a-date-column-to-my-logstash-with-a-date-i-choose-not-a-timestamp-hellpp/220627/4 "2020-02-25T11:25:47Z")

</div>

ty it's working

---

<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: [March 24, 2020, 11:25am UTC](https://discuss.elastic.co/t/i-want-to-add-a-date-column-to-my-logstash-with-a-date-i-choose-not-a-timestamp-hellpp/220627/5 "2020-03-24T11:25:52Z")

</div>

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