I want to change format of a date:

```
if (!empty($_POST['dob']) && !empty($_POST['mob']) && !empty($_POST['yob'])) {
    $yob = mysqli_real_escape_string($con, $_POST['yob']);
    $mob = mysqli_real_escape_string($con, $_POST['mob']);
    $dob = mysqli_real_escape_string($con, $_POST['dob']);
    $date = mysqli_real_escape_string($con, "$yob->$mob->$mob");
    $addtothedb = "INSERT INTO login (Dateofbirth) VALUES ('". $date . "')";          
    $result = mysqli_query($con, $addtothedb);
}

```

However the data I get from db is like `yyyy-mm-dd` whereas I would like to have it like `dd-mm-yyyy`.