I simply need to print the date of the day on the console in this format: Day.Month.Year
. Example: 03.10.09
Code:
GregorianCalendar c = new GregorianCalendar();
Date s = c.getTime();
System.out.println(s);
The console prints:
Sat Oct 03 13:33:36 CEST 2009
I could do it with a case statement, but I am sure there is something more elegant, which I simply didn't find.