title: Store Date Format in elasticsearch
body: <p>I met a problem when I want to add one datetime string into Elasticsearch.</p>
  
  <p>The document is below:</p>
  
  <pre><code>{"LastUpdate" : "2013/07/24 00:00:00"}
  </code></pre>
  
  <p>This document raised an error which is <code>"NumberFormatException" [For input string: \"20130724 00:00:00\"]</code></p>
  
  <p>I know that I can use the Date Format in Elasticsearch, but I don't know how to use even I read the document on the website.</p>
  
  <pre><code>{"LastUpdate": {
      "properties": {
          "type": "date", 
          "format": "yyyy-MM-dd"}
      }
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>{"LastUpdate": {
      "type": "date", 
      "format": "yyyy-MM-dd"
      }
  }
  </code></pre>
  
  <p>are wrong.</p>
  
  <p>How can I transfer the datetime string into date format in Elasticsearch?</p>
  
  <p>How can I store the datetime string directly into Elasticsearch?</p>