I would like to get the date in numbers in Java.
For example: today is 13th of dec, 2012. I would like to get it in numbers as 13.12.2012
How can I achieve it? Any help would be really appreciated.
P.S I tried something like:
Date d = new Date();
String date = d.toString().substring(0, 10);
But got the output as:Thu Dec 13
1 Answer