Grails - GSP Tag - formatDate

Tag - formatDate

Description

Allows the formatting of java.util.Date instances using the same patterns defined by the SimpleDateFormat class:

Parameters

  • format (required) - The format to use for the date
  • date (required) - The date object to format

Examples

<g:formatDate format="yyyy-MM-dd" date="${date}"/>
<g:formatDate format="MM/dd/yyyy hh:mm:ss" date="${date}" />

Output: 2009-08-13 08/13/2009 10:36:45