How to format the date and time on a JSF page when rendering a Date object?
Issue
- How to format the date and time on a JSF page when rendering a Date object?
Example:
<h:column>
<f:facet name="header">Prize Given Date</f:facet>
<div align="center"><h:outputLabel
value="#{row.prizeGivenDate}" /></div>
</h:column>
prizeGivenDate is java.sql.Timestamp, but displays as "02/04/2011". Is it possible to make it display as "02/04/2011 HH:mm:ss"?
Environment
- JBoss Enterprise Application Platform (EAP) 4.3.0.GA_CP08
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
