# Convert String to Date with ruby

**URL:** https://discuss.elastic.co/t/convert-string-to-date-with-ruby/208345
**Category:** Logstash
**Created:** [November 18, 2019, 3:51pm UTC](https://discuss.elastic.co/t/convert-string-to-date-with-ruby/208345 "2019-11-18T15:51:59Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ja123](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@ja123](https://discuss.elastic.co/u/ja123)
#### Post date: [November 18, 2019, 3:51pm UTC](https://discuss.elastic.co/t/convert-string-to-date-with-ruby/208345/1 "2019-11-18T15:51:59Z")

</div>

I am trying to parse string to date with ruby. With the code

`event.set("[parsed][Journey][#{x}][Abfahrtsdatum]",Date.parse(event.get("[parsed][Journey][#{x}][Abfahrtsdatum]")));`

I get the following error:

`Ruby exception occurred: Missing Converter handling for full class name=org.jruby.ext.date.RubyDate, simple name=RubyDate`

The value of field `[parsed][Journey][#{x}][Abfahrtsdatum]` looks like this: "18.11.19"

---

<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: [December 16, 2019, 3:52pm UTC](https://discuss.elastic.co/t/convert-string-to-date-with-ruby/208345/2 "2019-12-16T15:52:01Z")

</div>

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