date from string in java code example
Example 1: java date to string
Format formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String s = formatter.format(date);
Example 2: how to read a date string in java
LocalDate date = LocalDate.parse("2018-05-05");