I have the following scenario :
SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\"); System.out.println(dateFormat.parse(\"31/05/2011\"));
You can use simple date format in Java using the code below
SimpleDateFormat simpledatafo = new SimpleDateFormat("dd/MM/yyyy"); Date newDate = new Date(); String expectedDate= simpledatafo.format(newDate);