How to format a g:formatDate tag in grails
This is a simple snippet, but worthy of note!
(1) Put this in the gsp
(2) Put this in the grails-app\i18n\messages.properties
et voila!
(1) Put this in the gsp
<g:formatDate date="${theDate}" formatName="customDateFormat"/>
(2) Put this in the grails-app\i18n\messages.properties
customDateFormat=yyyy-MM-dd
et voila!
Comments
Post a Comment