You output the date using
System.out.println(thedate);
This doesn't use the date format you used to parse the date, but uses the toString()
method of java.util.Date
. This is why you see the date being print in a different format than expected.
To use you date format for parsing and output do something like this:
DateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm");
Date thedate = dateFormat.parse(newtoday);
System.out.println(dateFormat.format(thedate));