DEV Community


Posted on • Updated on

Hibernate - @Temporal

Temporal Annotation

The @Temporal is a Hibernate JPA annotation that is used for java.util.Date or java.util.Calendar. It converts the date and time values into a compatible format when storing or retrieving from a database. When handling temporal data remember to define the expected precision in the database. Temporal data precision can have DATE, TIME, or TIMESTAMP.


public Date dateAndTime;

public Date timeStamp;

public Date date;

public Date time;
Enter fullscreen mode Exit fullscreen mode

Top comments (0)