CallableStatement cstmt = null;
cstmt=conn.prepareCall("{call write_vehicle_tempplate(?)}");
cstmt.setString(1,temp.elementText("HPHM"));
cstmt.setTimestamp(2,getTimestamp(temp.elementText("DJRQ")));
public static Timestamp getTimestamp(String s){
if(s==null||s.equals(""))
{
return null;
}
Timestamp timestamp=null;
try
{
if(s.length()>19)
{
s=s.substring(0,19);
}
SimpleDateFormat bartDateFormat =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
java.util.Date date = bartDateFormat.parse(s);
timestamp= new Timestamp(date.getTime());
} catch (ParseException e)
{
e.printStackTrace();
}
return timestamp;
}