How to format a g:formatDate tag in grails

This is a simple snippet, but worthy of note!


(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

Popular posts from this blog

Getting Started: Quick Setup for GXT 3 (includes reset.css link how to)

How to setup GXT 3 examples, samples and demos

ExtJs4 : Dynamically Add Columns