# Date parse failure

**URL:** https://discuss.elastic.co/t/date-parse-failure/103123
**Category:** Kibana
**Created:** [October 7, 2017, 6:47pm UTC](https://discuss.elastic.co/t/date-parse-failure/103123 "2017-10-07T18:47:46Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![Clemens\_Overbosch](https://avatars.discourse-cdn.com/v4/letter/c/2bfe46/32.png) [@Clemens\_Overbosch](https://discuss.elastic.co/u/Clemens_Overbosch)
#### Post date: [October 7, 2017, 6:47pm UTC](https://discuss.elastic.co/t/date-parse-failure/103123/1 "2017-10-07T18:47:46Z")

</div>

So I'm doing a school project with a scraper, I'm now trying to visualize this scraped data inside kibana.

This is what my logstash config file looks like:

```
input {

	file{

		path => "/home/nod/Desktop/Data/bodybuilding_forum.csv"

		start_position => "beginning"

		sincedb_path => "/dev/null"

	}

}

filter{

	csv {

		separator => ","

		columns => ["PostDate", "Author", "Title"]

	}
	date {
		match => ["PostDate" , "dd/MMM/yyyy:HH:mm:ss Z"]
	}

}

output{

	elasticsearch{

	hosts => "localhost:9200"

	index => "forum"

	document_type => "forum_bodybuilding"

	}

	stdout{}

}

```

My data is a csv file with just strings inside, looks like this:

> PostDate Author Title  
> 18 feb 2005 XXL Nutrition XXLNutrition.nl  
> 21 jan 2015 Analytic [Supplementlabtest.com](http://Supplementlabtest.com) - Alle testen op één plaats  
> 23 mrt 2015 BULK POWDERS BulkPowders.nl

It's just 3 columns in a csv file, hard to show here.

In kibana I get this error:

> "host": "research",  
> "Author": "Galen",  
> "Title": "Boek: Bonds voedingssupplementen",  
> "message": "12 mei 2017,Galen,Boek: Bonds voedingssupplementen",  
> "PostDate": "12 mei 2017",  
> "tags": [  
> "\_dateparsefailure"

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 7, 2017, 7:00pm UTC](https://discuss.elastic.co/t/date-parse-failure/103123/2 "2017-10-07T19:00:52Z")

</div>

> [@Clemens\_Overbosch](#):
>
> match =\> ["PostDate" , "dd/MMM/yyyy:HH:mm:ss Z"]

That does not match;

> [@Clemens\_Overbosch](#):
>
> 18 feb 2005

If you update the match pattern you will be good 🙂

---

<div class="post-metadata">

### Author: ![Clemens\_Overbosch](https://avatars.discourse-cdn.com/v4/letter/c/2bfe46/32.png) [@Clemens\_Overbosch](https://discuss.elastic.co/u/Clemens_Overbosch)
#### Post date: [October 7, 2017, 7:35pm UTC](https://discuss.elastic.co/t/date-parse-failure/103123/3 "2017-10-07T19:35:04Z")

</div>

How would I need to change it?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 7, 2017, 7:36pm UTC](https://discuss.elastic.co/t/date-parse-failure/103123/4 "2017-10-07T19:36:19Z")

</div>

[https://www.elastic.co/guide/en/logstash/5.6/plugins-filters-date.html#plugins-filters-date-match](https://www.elastic.co/guide/en/logstash/5.6/plugins-filters-date.html#plugins-filters-date-match), let us know if you run into further problems.

---

<div class="post-metadata">

### Author: ![Clemens\_Overbosch](https://avatars.discourse-cdn.com/v4/letter/c/2bfe46/32.png) [@Clemens\_Overbosch](https://discuss.elastic.co/u/Clemens_Overbosch)
#### Post date: [October 7, 2017, 7:40pm UTC](https://discuss.elastic.co/t/date-parse-failure/103123/5 "2017-10-07T19:40:11Z")

</div>

So if I read there i also need to add locale=NL, right? As well as making it "dd MMM yyyy Z".

---

<div class="post-metadata">

### Author: ![Clemens\_Overbosch](https://avatars.discourse-cdn.com/v4/letter/c/2bfe46/32.png) [@Clemens\_Overbosch](https://discuss.elastic.co/u/Clemens_Overbosch)
#### Post date: [October 7, 2017, 7:44pm UTC](https://discuss.elastic.co/t/date-parse-failure/103123/6 "2017-10-07T19:44:41Z")

</div>

Still getting the same error as before

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [October 7, 2017, 7:51pm UTC](https://discuss.elastic.co/t/date-parse-failure/103123/7 "2017-10-07T19:51:14Z")

</div>

You do not have a timezone, so something like this should work:

```auto
date {
    match => ["PostDate", "dd MMM yyyy"]
    locale => "nl"
}

```

---

<div class="post-metadata">

### Author: ![Clemens\_Overbosch](https://avatars.discourse-cdn.com/v4/letter/c/2bfe46/32.png) [@Clemens\_Overbosch](https://discuss.elastic.co/u/Clemens_Overbosch)
#### Post date: [October 7, 2017, 7:55pm UTC](https://discuss.elastic.co/t/date-parse-failure/103123/8 "2017-10-07T19:55:58Z")

</div>

lol thats awkward.. it worked.. i had the same except i didnt have nl in quotes lol. Thanks a bunch.

---

<div class="post-metadata">

### Author: ![Clemens\_Overbosch](https://avatars.discourse-cdn.com/v4/letter/c/2bfe46/32.png) [@Clemens\_Overbosch](https://discuss.elastic.co/u/Clemens_Overbosch)
#### Post date: [October 7, 2017, 9:04pm UTC](https://discuss.elastic.co/t/date-parse-failure/103123/9 "2017-10-07T21:04:12Z")

</div>

Even tho it didnt give a parsing error anymore it does still seem that PostDate is still a string inside kibana, and none of my stuff seems aggregatable:

 ![kibana_prob](https://us1.discourse-cdn.com/elastic/original/3X/0/b/0ba6fe4e4a0ddd6e8ad6594d72fca8b860682b13.png)

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 7, 2017, 9:16pm UTC](https://discuss.elastic.co/t/date-parse-failure/103123/10 "2017-10-07T21:16:05Z")

</div>

You will need to delete the index and then recreate it so the mappings are correctly set.

Also for string, use the `.keyword` field instead.

---

<div class="post-metadata">

### Author: ![Clemens\_Overbosch](https://avatars.discourse-cdn.com/v4/letter/c/2bfe46/32.png) [@Clemens\_Overbosch](https://discuss.elastic.co/u/Clemens_Overbosch)
#### Post date: [October 7, 2017, 9:17pm UTC](https://discuss.elastic.co/t/date-parse-failure/103123/11 "2017-10-07T21:17:30Z")

</div>

I've already deleted the indexes multiple time tho..

This is what my config looks like atm:

```
input {

	file{

		path => "/home/ipfit6/Desktop/Data/bodybuilding_forum.csv"

		start_position => "beginning"

		sincedb_path => "/dev/null"

	}

}

filter{

	csv {

		separator => ","

		columns => ["PostDate", "Author", "Title"]

	}
	date {
		match => ["PostDate", "dd MMM yyyy"]
		locale => "nl"
	}

}

output{

	elasticsearch{

	hosts => "localhost:9200"

	index => "forum"

	document_type => "forum_bodybuilding"

	}

	stdout{}

}
```

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 7, 2017, 9:19pm UTC](https://discuss.elastic.co/t/date-parse-failure/103123/12 "2017-10-07T21:19:55Z")

</div>

Ah ok. The date filter puts things into `@timestamp` by default, if you don't want that you need to tell it so. The docs cover that.

---

<div class="post-metadata">

### Author: ![Clemens\_Overbosch](https://avatars.discourse-cdn.com/v4/letter/c/2bfe46/32.png) [@Clemens\_Overbosch](https://discuss.elastic.co/u/Clemens_Overbosch)
#### Post date: [October 7, 2017, 9:23pm UTC](https://discuss.elastic.co/t/date-parse-failure/103123/13 "2017-10-07T21:23:06Z")

</div>

Ah yeah.. figured it was something like that once I look properly at the timestamp info so thats fine. Still I can't get any visualisation from the data i put in for some reason.

---

<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: [November 4, 2017, 9:23pm UTC](https://discuss.elastic.co/t/date-parse-failure/103123/14 "2017-11-04T21:23:40Z")

</div>

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