DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); Date test = df.parse("2018-02-09"); Change the year in the dateboxes below, either by typing or popup selection wrong wrong wrong wrong works works works works