views:

312

answers:

2

I have a domain class in Grails with a field journeyDate. journeyDate is defined like this:-

Date journeyDate

then in my list.gsp I display the date like this:-

${fieldValue(bean:journeyInstance, field:'journeyDate')}

And it is displayed in the following format:-

2009-08-19 17:12:00.0

does anyone know how I can format this on the list.gsp so that it doesn't display the seconds? (I don't want to change the way it is stored in the database)

+4  A: 

Have you looked at the date format tag?

Langali
+1  A: 

Use

${fieldValue(bean:journeyInstance, field:'journeyDate').format("dd MM, yyyy")}

Amit Jain