I've got a Calendar that comes back in a following format (it's in Java Calendar type): 2020-02-15T00:00:00
.
What's the simplest, shortest way to convert it to the following Calendar like this one and persist the Calendar type: Mon Nov 05 2018 14:08:58 GMT+0000 (Greenwich Mean Time)
?
In JavaScript we can use something like var date = new Date();
Assuming you have an instance of Calendar cal, you should be able to do this:
getTime gives you a date for the SimpleDateFormat.
This is the simplest way to deal with a Calendar object. Also the most error prone one. I do agree with all the comments stating you should use java.time, but who am I to tell you what to do.