title: How to handle different date formats in Spring MVC controller?
body: <p>Is it possible to handle different date format in a Spring MVC controller?</p>
  
  <p>I know that setting something like this</p>
  
  <pre><code>@InitBinder
  protected void initBinder(WebDataBinder binder) {
      SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
      binder.registerCustomEditor(Date.class, new CustomDateEditor(
              dateFormat, false));
  }
  </code></pre>
  
  <p>I can handle <code>dd/MM/yyyy</code> format, but what if i want to parse also dates in <code>yyyyMMddhhmmss</code> format? Should I add multiple <code>CustomDateEditor</code>s in my controller?</p>