Exception in thread "main" java.text.ParseException: Unparseable date: "01.04.1984 00.00.00"
I tryed parse date from string "01.04.1984 00.00.00" through method parse in DataFormat.
import java.text.ParseException;
import java.text.SimpleDateFormat;
public class Main {
public static void main(String[] args) throws ParseException {
String data = "01.04.1984 00.00.00";
SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy HH.mm.ss");
sdf.setLenient(false);
DateFormat dateFormat = sdf;
dateFormat.parse(data);
}
}
But, I get exception
at java.text.DateFormat.parse(DateFormat.java:366)
at Main.main(Main.java:13)