Pessoal,
Não achei nenhum método eficaz de converter String para Timestamp
String está no formato ("dd/MM/yyyy hh:mm:ss")
Tentei algo como:
public static Timestamp time(String data, String hora)
throws ParseException {
String dataHora = data + " " + hora;
Timestamp timestamp = null;
try {
SimpleDateFormat formatoData = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss");
Calendar c = Calendar.getInstance();
System.out.println(dataHora);
c.setTime(formatoData.parse(dataHora));
timestamp = new Timestamp(c.getTimeInMillis());
System.out.println(timestamp);
} catch (Exception e) {
}
return timestamp;
}
só que da nulo