I want to convert a string to date and get epochtime from that date. following is my code which is giving me error
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-mm-dd");
LocalDateTime localDate = LocalDateTime.parse(day, formatter);
long TCepochtime = localDate.toEpochSecond(ZoneOffset.ofTotalSeconds(19800));
it gives me error at line 2
day string is "2019-12-25"