Question: how to convert yyyy-mm-dd to date in java?
Answer: SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy"); Date date = formatter. parse("22-Sep-2018"); There are many patterns that we can pass into the constructor of SimpleDateFormat . You can combine pretty much any number of formats using the available patterns.