public static Date stringToDate(String datstr){
  SimpleDateFormat fmt=ComponentTime.makeInputFormatter();
  ParsePosition zero=new ParsePosition(0);
  if (datstr.length() > 23)   datstr=datstr.substring(0,23);
  return (fmt.parse(datstr,zero));
}

public static Date stringToDate ( String datstr ) { SimpleDateFormat fmt = ComponentTime . makeInputFormatter ( ) ; ParsePosition zero = new ParsePosition ( 0 ) ; if ( datstr . length ( ) > 23 ) datstr = datstr . substring ( 0 , 23 ) ; return ( fmt . parse ( datstr , zero ) ) ; }
convert a string to a java date
