For normal date Strings like \"2019-04-08 08:35\"
\"2019-04-08 08:35\"
SimpleDateFormat df = new SimpleDateFormat(\"yyyy-dd-mm hh:mm\");
but What sh
SimpleDateFormat is not a Date, it's used to
SimpleDateFormat
Date
You can parse String to java.time.LocalDateTime directly since java8:
java.time.LocalDateTime
LocalDateTime localDateTime = LocalDateTime.parse("2019-04-21T12:08:35"); System.out.println(localDateTime);