This is the simplest code to do so Calendar calendar = new GregorianCalendar(); Date date = calendar.getTime(); DateFormat df=new SimpleDateFormat("dd':'MM':'yy"); //MM must be in caps else it will give the minutes System.out.println("date is"+df.format(date))