title: ThymeLeaf pass TimeStamp value
body: <p>I am trying to pass timestamp value in the format of &quot;<code>2013-12-31 12:00:00.000007</code>&quot;, my java model class will take this property as &quot;<code>java.sql.Timestamp</code>&quot;.</p>
  <p>I tried passing using following html code, but it does not take the value entered in the field, instead it takes null value.</p>
  <pre><code>&lt;td&gt;&lt;input id=&quot;updateDateTime&quot; name=&quot;updateDateTime&quot; type=&quot;text&quot; th:field=&quot;*{updateDateTime}&quot;/&gt;&lt;/td&gt;
  </code></pre>
  <p>As well in Controller class, i tried using custom binder as below, but still produces null values to &quot;updateDateTime&quot;</p>
  <pre><code>@InitBinder
      public void binder(WebDataBinder binder) {
          binder.registerCustomEditor(Timestamp.class,
          new PropertyEditorSupport() {
              public void setAsText(String value) {
                  try {
                      Date parsedDate = new SimpleDateFormat(&quot;MM/dd/YYYY HH:mm:ss.SSSSSS&quot;).parse(value);
                      setValue(new Timestamp(parsedDate.getTime()));
                  } catch (ParseException e) {
                      setValue(null);
                  }
              }
          });
      }
  </code></pre>