title: Formatting date in Thymeleaf
body: <p>I'm brand new to Java/Spring/Thymeleaf so please bear with my current level of understanding. I did review <a href="https://stackoverflow.com/questions/20361691/formatting-thfield-in-thymeleaf">this similar question</a>, but wasn't able to solve my problem.</p>
  
  <p>I'm trying to get a simplified date instead of the long date format.</p>
  
  <pre><code>// DateTimeFormat annotation on the method that's calling the DB to get date.
  @DateTimeFormat(pattern="dd-MMM-YYYY")
  public Date getReleaseDate() {
      return releaseDate;
  }
  </code></pre>
  
  <p>​
  html:
  </p>
  
  <pre><code>&lt;table&gt;
      &lt;tr th:each="sprint : ${sprints}"&gt;
          &lt;td th:text="${sprint.name}"&gt;&lt;/td&gt;
          &lt;td th:text="${sprint.releaseDate}"&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Current output</p>
  
  <pre><code>sprint1 2016-10-04 14:10:42.183
  </code></pre>