I have a method that will take in a
string and convert it into a Date using DateFormat.
The problem is that I am not sure what the format the string should take.
I used the date : "15-Jul-1999" which through up a java.text.ParseException: Unparseable date: "15-Jul-1999"
All I need is the day month and year not the time.
Thanks for any help
Tony
public void setMaturityDate(String date)
{
DateFormat df = DateFormat.getDateInstance();
try
{
this.maturityDate = df.parse(date);
}
catch(ParseException e)
{
System.out.println("Error "+e);
}
}