0
I am trying to save a date in the database using spring + jpa in mysql. In my class I have the following field:
@Column(name = "dataNasc")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@NotNull
private Date dataNasc;
When I try to save for example: 2020-02-11, it saves with the time together. What can I do to remove the time?
the date is deprecated, if you are saving without the hours, exchange for a Localdate
– Lucas Miranda
worked! thanks! Want to comment out the question so I give the vote for your answer?
– rods
I sent, just give that like rs..
– Lucas Miranda