I have this date "2018-05-30T16:19:58.016Z"
coming from my Angular app.
In Spring, the field date
is as follows :
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
private Date date;
The date is well stored, but with this format YYYY-MM-dd
.
Is there anything that I'm missing ?
MySql date
type can't hold data with timestamp. It has to be datetime
in order to contain date time with timestamp data.