SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
String date = sdf.format(new Date());
System.out.println(date);
Result for today ie 03/23/2014
But when I do
SimpleDateFormat sdf = new SimpleDateFormat("dd/mm/yyyy");
the result can be 05/23/2014, 05/23/2014, 06/23/2014 and a son with each run. Why is that?
source
share