Temporal annotation shows which part of the datetime to be stored to database:
@Temporal(TemporalType.TIMESTAMP) // date & time
@Temporal(TemporalType.DATE) // only date part
@Temporal(TemporalType.TIMESTAMP) // only time part
Nice tutorial: http://shengwangi.blogspot.bg/2014/12/the-value-of-annotation-temporal-for-date-column.html
No comments:
Post a Comment