title: Convert Datetime to just date
body: <p>I am using logstash to move some documents from a database into elasticsearch. Some of these documents have a datetime and others only have a date, as the way the dates were being stored was changed. In logstash, I am trying to add a new field that will be just the date, without time, so I can be sure that certain searches will work the way I expect. </p>
  
  <p>I have tried using the date filter and ruby filter to runa script, but both produce errors (in the case of the ruby filter, the event that you can manipulate apparently doesn't have any of the fields of the actual document).</p>
  
  <p>The document  I am moving over looks something like this:</p>
  
  <pre class="lang-json prettyprint-override"><code>{
      "id": "something"
      "type": "sometype"
      "datetime": some-da-teTso:me:ti.meZ
  }
  </code></pre>