Grails 24 hour format

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Grails 24 hour format


Any help would be greatly appreciated. Thank you.
madturnipz
I have a field in my mysql database that is a datetime. It uses 24 hour time. However when I try to display this field in grails, it uses 12-hour time. I'm not sure why grails is converting it to be 12-hour time when its obvious it is 24-hour time when I select it from the db. Is there a dateformat that I can use to maintain the 24 hour time?

This is how it looks in my gsp:
<g:link action="updateStatus" id="${monitorInstance?.id}"><g:formatDate format="hh:mm:ss" date="${monitorInstance?.appDate}"/></g:link>
Reply | Threaded
Open this post in threaded view
|

Re: Grails 24 hour format

Nicolás Dijkstra
Hi, you shoul use

format="HH:mm:ss"

Notice H is in uppercas.

On Mon, Jan 18, 2010 at 5:55 PM, madturnipz <[hidden email]> wrote:

I have a field in my mysql database that is a datetime. It uses 24 hour time.
However when I try to display this field in grails, it uses 12-hour time.
I'm not sure why grails is converting it to be 12-hour time when its obvious
it is 24-hour time when I select it from the db. Is there a dateformat that
I can use to maintain the 24 hour time?

This is how it looks in my gsp:
<td><g:link action="updateStatus" id="${monitorInstance?.id}"><g:formatDate
format="hh:mm:ss" date="${monitorInstance?.appDate}"/></g:link></td>

Any help would be greatly appreciated. Thank you.
--
View this message in context: http://old.nabble.com/Grails-24-hour-format-tp27216631p27216631.html
Sent from the grails - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
Nicolás Dijkstra