So I have a Date variable which I formatted using the following code:
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date currentDate = new Date();
String date = format.format(currentDate);
I then put the String 'date' into my database.
Now: I have to pull it out of the database. It comes out as, of course, a String in the format shown above.
My question is how do I turn this String into a date variable? I'm very much struggling to find the most efficient way.
Thank you.