Hi
i have a problem related to
string conversion in java.util.Date data type so that it can be inserted into the data base so for this telll me how
what i did till now is:---
String adate="";
java.util.Date a_date=null;
SimpleDateFormat ts= new SimpleDateFormat("dd-MMM-yyyy");
adate=request.getParameter("1-sep-2000");
try{
if((adate!=null)&& (!(adate.equals(""))))
{
a_date = (java.util.Date) ts.parse(adate);
}
}catch(ParseException e) {
System.out.println("Unable to parse " + e);
}
out.println("a_date:--"+a_date+"<br>");
but when i run this code the out put will be :--
java.text.ParseException: Unparseable date: "null"
at java.text.DateFormat.parse(DateFormat.java:334)
at jsp_servlet.__dod._jspService(dod.jsp:164)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:971)
but as u can see the value in string is not null but it can not parse that value so tell me the solution
thanks
alot for your kind help