5
Speak guys, I need to format a date in Java.
I’m using Java web, Primefaces, MVC, TDD, JSF, Hibernate. I am an intern and I am doing a Project Manager project for my company.
My date input view looks like this:
<h:outputText value="Data de Início"/>
<p:calendar value="#{projetoBean.projetoCadastro.dataInicio}" pattern="dd/MM/yyyy">
</p:calendar>
My view to show the date is like this:
<p:column headerText="Data de Início" filterBy="#{projeto.dataInicio}">
<h:outputText value="#{projeto.dataInicio}"/>
</p:column>
The entity so:
@Temporal(value = TemporalType.TIMESTAMP)
@Column(name = "dataInicio_projeto")
private Date dataInicio;
And she shows it like this:
I wanted you to show it like this:
30/09/2016 - Day/Month/Year and no timetable.