I want to convert a string date object to Date object. In my request there is a field of the form "dateCreated":"Tue Jul 30 13:41:40 WIB 2019"
. I need to model it to Date class. How can I achieve this?
I thought the controller will automatically cast it to Date object. It didn't work. Also, simple casting to Date object from string also didnt work. I could not find a string formatter for this also.
private Date dateCreated = new Date();
So I want to convert a stringified
Date object to Date object.