# Please help - date parse error (a very simple dd-mm-yyyy) csv to logstash

**URL:** <https://discuss.elastic.co/t/please-help-date-parse-error-a-very-simple-dd-mm-yyyy-csv-to-logstash/227599>\
**Category:** Logstash\
**Created:** [April 11, 2020, 11:55am UTC](https://discuss.elastic.co/t/please-help-date-parse-error-a-very-simple-dd-mm-yyyy-csv-to-logstash/227599 "2020-04-11T11:55:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Venkatesh\_Murthy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/venkatesh_murthy/32/66160_2.png) [@Venkatesh\_Murthy](https://discuss.elastic.co/u/Venkatesh_Murthy)\
**Post date:** [April 11, 2020, 11:55am UTC](https://discuss.elastic.co/t/please-help-date-parse-error-a-very-simple-dd-mm-yyyy-csv-to-logstash/227599/1 "2020-04-11T11:55:23Z")

</div>

my CSV has the following:  
gymid,gymdate,sets,exercise,worktime,rest,reps,weight,muclegroup  
3013,20-03-2020,1,Barbell Deadlift,01.42,03.02,11,47,back

my config has:

input  
{

```
file{
    path=>"D:/gym1.csv"
    start_position=>"beginning"
    sincedb_path=> "NUL"
}

```

}

filter  
{  
csv {  
separator=\>","  
columns=\> ["gymid","gymdate", "sets", "exercise", "worktime", "rest", "reps", "weight", "musclegroup"]

```
}

```

date {

match =\> ["gymdate", "dd-mm-yyyy"]

target =\> "@timestamp"

}

mutate {convert =\> ["sets", "integer"]}

mutate {convert =\> ["reps", "integer"]}

mutate {convert =\> ["worktime", "float"]}

mutate {convert =\> ["rest", "float"]}

mutate {convert =\> ["reps", "float"]}

mutate {convert =\> ["weight", "integer"]}

}

output

{

elasticsearch{

```
hosts=> "localhost:9200"

index=>"gym"

document_type => "workout"

```

}

stdout{}

}

i get dateparseerror

---

<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:** [April 11, 2020, 2:24pm UTC](https://discuss.elastic.co/t/please-help-date-parse-error-a-very-simple-dd-mm-yyyy-csv-to-logstash/227599/2 "2020-04-11T14:24:48Z")

</div>

> [@Venkatesh\_Murthy](#):
>
> i get dateparseerror

Month should be MM, not mm, although I am surprised you get an error for that.

---

<div class="post-metadata">

**Author:** ![Venkatesh\_Murthy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/venkatesh_murthy/32/66160_2.png) [@Venkatesh\_Murthy](https://discuss.elastic.co/u/Venkatesh_Murthy)\
**Post date:** [April 12, 2020, 5:27am UTC](https://discuss.elastic.co/t/please-help-date-parse-error-a-very-simple-dd-mm-yyyy-csv-to-logstash/227599/3 "2020-04-12T05:27:07Z")

</div>

thanks a ton this solved the problem. i saw different behaviours each time. Once it did not give me error but simply take it as a string and when sometimes the error that came up. Also until the time i used the timezone of UTC, the date kept showing some other values  
thank you for helping.

---

<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:** [May 10, 2020, 5:27am UTC](https://discuss.elastic.co/t/please-help-date-parse-error-a-very-simple-dd-mm-yyyy-csv-to-logstash/227599/4 "2020-05-10T05:27:17Z")

</div>

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