How to convert current date into string in java?

String date = new SimpleDateFormat("dd-MM-yyyy").format(new Date());

Leave a Comment