private void setTimeStampOrNull(PreparedStatement stmt, int index,
String value) throws UnsupportedFormatException, SQLException {
if (null != value) {
Date d = DateUtils.parseSQLFormats(value);
if (d == null)
throw new UnsupportedFormatException();
stmt.setTimestamp(index, new java.sql.Timestamp(d.getTime()));
} else {
stmt.setNull(index, Types.TIMESTAMP);
}
}