title: Can't convert from String to Timestamp; Wrong format
body: <p>I'm getting the following error when trying to pass a date object from AngularJS to java spring backend:</p>
  
  <blockquote>
    <p>Failed to convert from type [java.lang.String] to type 
        [@javax.persistence.Column java.sql.Timestamp] for value 
        '2018-06-12T22:00:00.000Z'; nested exception is 
        java.lang.IllegalArgumentException: Timestamp format must be
         yyyy-mm-dd hh:mm:ss[.fffffffff]</p>
  </blockquote>
  
  <p>So far I tried to format the date object to a string in the expected format:</p>
  
  <pre><code>$filter('date')(date, "yyyy-MM-dd hh:mm:ss");
  </code></pre>
  
  <p>which leads to an error telling:</p>
  
  <blockquote>
    <p>Error: [ngModel:datefmt] Expected <code>2018-06-13 12:00:00</code> to be a date</p>
  </blockquote>
  
  <p>Seems like I need to pass a date object but I can't find a way to influence the date format AngularJS is attempting to convert to.</p>