public static java.sql.Time toSqlTime(String time){
  java.util.Date newDate=toDate("1/1/1970",time);
  if (newDate != null) {
    return new java.sql.Time(newDate.getTime());
  }
 else {
    return null;
  }
}

public static java . sql . Time toSqlTime ( String time ) { java . util . Date newDate = toDate ( "1/1/1970" , time ) ; if ( newDate != null ) { return new java . sql . Time ( newDate . getTime ( ) ) ; } else { return null ; } }
converts a time string into a java . sql . time
