I have the input string as `2012-07-27` and I want the output as **`Date`** but with the same format like `2012-07-27`

### Code

```
 DateFormat df = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");

        try {
            Date today = df.parse("20-12-2005 23:59:59");
            System.out.println("Today = " + df.format(today));

                     } catch (ParseException e) {
            e.printStackTrace();
        }

```

### Output

```
20-12-2005 23:59:59

```

But it's string object I want the same output (`20-12-2005 23:59:59`) as date object not as string object.

How can I get the **`Date`** in the form `DD-MM-YYYY HH:MM:SS`?