Java tutorial
import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static void main(String args[]) throws Exception { SimpleDateFormat ft = new SimpleDateFormat("yyyy-MM-dd"); String input = "2020-11-11"; System.out.print(input + " Parses as "); Date t = ft.parse(input); System.out.println(t); } }