Complete date with date format Using Hibernate
// @Temporal(TemporalType.DATE)—comment temporal date in pojo to get both date and time
@Column(name="HOW_TO_RP_LAST_UPDATE_DATE", length=7)
public Date getHowToRpLastUpdateDate() {
return this.howToRpLastUpdateDate;
}
@Temporal(TemporalType.DATE) /*add temporal date in pojo to get only date*/
@Column(name="HOW_TO_RP_LAST_UPDATE_DATE", length=7)
public Date getHowToRpLastUpdateDate() {
return this.howToRpLastUpdateDate;
}
/*Alternatively you can also have@ Temporal*/
@Temporal(TemporalType.TIMESTAMP)
@Column(name="ACTUAL_DATE", nullable=false, length=7)
public Date getActualDate() {
return actualDate;
}
Comments
Post a Comment