# Issue with dates parsing

**URL:** https://discuss.elastic.co/t/issue-with-dates-parsing/62540
**Category:** Logstash
**Created:** [October 8, 2016, 3:21am UTC](https://discuss.elastic.co/t/issue-with-dates-parsing/62540 "2016-10-08T03:21:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Wayne\_Taylor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wayne_taylor/32/45984_2.png) [@Wayne\_Taylor](https://discuss.elastic.co/u/Wayne_Taylor)
#### Post date: [October 8, 2016, 3:21am UTC](https://discuss.elastic.co/t/issue-with-dates-parsing/62540/1 "2016-10-08T03:21:47Z")

</div>

Sorry if this has been asked a million times. I am stuck I checked out every post:

I have a scheduled logstash configuration from Microsoft SQL Server. Date is in the following example format:

2016-07-30T02:25:06.000Z

In my logstash configuration, I have this and tried many different options with failure.

filter {  
date {  
match =\> ["tur\_start\_time","YYYY-MM-dd HH:mm:ss,SSS"]  
}  
}

Please help

Currently get the following error:

> Failed parsing date from field {:field=\>"tur\_start\_time", :value=\>"2016-07-30T02:18:48.000Z", :exception=\>"cannot convert instance of class org.jruby.RubyObject to class java.lang.String", :config\_parsers=\>"YYYY-MM-dd HH:mm:ss,SSS", :config\_locale=\>"default=en\_US", :level=\>:warn}  
> Failed parsing date from field {:field=\>"tur\_start\_time", :value=\>"2016-07-30T03:04:27.000Z", :exception=\>"cannot convert instance of class org.jruby.RubyObject to class java.lang.String", :config\_parsers=\>"YYYY-MM-dd HH:mm:ss,SSS", :config\_locale=\>"default=en\_US", :level=\>:warn}  
> Failed parsing date from field {:field=\>"tur\_start\_time", :value=\>"2016-07-30T04:25:18.000Z", :exception=\>"cannot convert instance of class org.jruby.RubyObject to class java.lang.String", :config\_parsers=\>"YYYY-MM-dd HH:mm:ss,SSS", :config\_locale=\>"default=en\_US", :level=\>:warn}  
> Failed parsing date from field {:field=\>"tur\_start\_time", :value=\>"2016-07-30T02:54:02.000Z", :exception=\>"cannot convert instance of class org.jruby.RubyObject to class java.lang.String", :config\_parsers=\>"YYYY-MM-dd HH:mm:ss,SSS", :config\_locale=\>"default=en\_US", :level=\>:warn}  
> Failed parsing date from field {:field=\>"tur\_start\_time", :value=\>"2016-07-30T02:25:06.000Z", :exception=\>"cannot convert instance of class org.jruby.RubyObject to class java.lang.String", :config\_parsers=\>"YYYY-MM-dd HH:mm:ss,SSS", :config\_locale=\>"default=en\_US", :level=\>:warn}

Wayne

---

<div class="post-metadata">

### Author: ![Wayne\_Taylor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wayne_taylor/32/45984_2.png) [@Wayne\_Taylor](https://discuss.elastic.co/u/Wayne_Taylor)
#### Post date: [October 9, 2016, 7:15pm UTC](https://discuss.elastic.co/t/issue-with-dates-parsing/62540/2 "2016-10-09T19:15:12Z")

</div>

Not sure I understand why. However, this solved it:

```
filter {
 mutate {
    convert => ["tur_start_time", "string"]
 }

 date {
     match => ["tur_start_time", ISO8601]
     target => "@timestamp"
 }
}
```

---

<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: [July 6, 2017, 4:34am UTC](https://discuss.elastic.co/t/issue-with-dates-parsing/62540/3 "2017-07-06T04:34:58Z")

</div>


