Reputation: 1089
using: Joda-Time Grails plugin. using: DateTime in domain object.
How to get only time component without milliseconds in a GSP input field?
Using this:
<joda:timeField type="date" name="time" value="${myDate}" />
I get for example: 17:00:00.000
Where I would like to have: 17:00
Upvotes: 1
Views: 277
Reputation: 50245
<joda:time value="${myDate}">
<joda:format value="${it}" pattern="HH:mm"/>
</joda:time>
<joda:time>
and <joda:format>
can be used as above.
Upvotes: 1