I have been looking around stack-overflow and various other websites for the solution to my problem but haven\'t found any suitable for my specific purposes and have been un
You could use parse like this:
String fromDate = "2009/05/19"; DateFormat df = new SimpleDateFormat("yyyy/MM/dd"); java.util.Date dtt = df.parse(fromDate);
this turns any(well formatted) string into a date variable.
the code is from here