public static java.util.Date toDate(String monthStr,String dayStr,String yearStr,String hourStr,String minuteStr,String secondStr){
  int month, day, year, hour, minute, second;
  try {
    month=Integer.parseInt(monthStr);
    day=Integer.parseInt(dayStr);
    year=Integer.parseInt(yearStr);
    hour=Integer.parseInt(hourStr);
    minute=Integer.parseInt(minuteStr);
    second=Integer.parseInt(secondStr);
  }
 catch (  Exception e) {
    return null;
  }
  return toDate(month,day,year,hour,minute,second);
}

public static java . util . Date toDate ( String monthStr , String dayStr , String yearStr , String hourStr , String minuteStr , String secondStr ) { int month , day , year , hour , minute , second ; try { month = Integer . parseInt ( monthStr ) ; day = Integer . parseInt ( dayStr ) ; year = Integer . parseInt ( yearStr ) ; hour = Integer . parseInt ( hourStr ) ; minute = Integer . parseInt ( minuteStr ) ; second = Integer . parseInt ( secondStr ) ; } catch ( Exception e ) { return null ; } return toDate ( month , day , year , hour , minute , second ) ; }
makes a date from separate strings for month , day , year , hour , minute , and second .
