lo hace usted mismo con una expresión regular:
public class SpecialDateFormat
{
private final static Pattern PATTERN = Pattern.compile("(\\d{2})[\\.\\/\\-](\\d{2})[\\.\\/\\-](\\d{4}) (\\d{2}):(\\d{2})");
public static Date parse(String text) throws ParseException {
Matcher m = PATTERN.matcher(text);
if (m.matches()) {
int dd = Integer.parseInt(m.group(1));
int mm = Integer.parseInt(m.group(2));
int yy = Integer.parseInt(m.group(3));
int hh = Integer.parseInt(m.group(4));
int mi = Integer.parseInt(m.group(5));
// NOTE: Checking if values are in valid ranges omitted
Calendar cal = Calendar.getInstance();
cal.set(yy, mm - 1, dd, hh, mi, 0);
return cal.getTime();
}
else {
throw new ParseException("Unparseable date: " + text, 0);
}
}
}
Nota sin embargo, que esto permite mezclar diferentes separadores, por ejemplo "17-09/2009 12:00" estaría permitido.
Gracias, voy a empezar a trabajar en un analizador genérico de fechas para nuestro código base y este será un buen comienzo – Tarski