I have the following scenario :
SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\"); System.out.println(dateFormat.parse(\"31/05/2011\"));
This will help you. DateFormat df = new SimpleDateFormat("dd/MM/yyyy"); print (df.format(new Date());