Skip to main content
edited tags
Link
cнŝdk
  • 32.2k
  • 7
  • 62
  • 81
Source Link
Héctor Valls
  • 26.4k
  • 43
  • 153
  • 268

Date format with Timestamp and Hibernate

I have an entity with a Timestamp field corresponding to a DATE column in the Oracle database.

@Entity public class Order { private Tiemstamp purchaseDate; //more fields... } 

When I insert a row, DATE format in the database is "dd/MM/yyyy hh:mm:ss", but I want it to be just "dd/MM/yyyy".

How can I define the format?