$date = "26/10/1986";
$date = str_replace('/', '-', $date);
$date = date('Y-m-d H:i:s', strtotime($date));
output: 1986-10-26 00:00:00
Or this…
$date = str_replace('-', '/', $hiredate[$key]);
$date = date('d/m/Y g:ia', strtotime($date));
$date = "26/10/1986";
$date = str_replace('/', '-', $date);
$date = date('Y-m-d H:i:s', strtotime($date));
output: 1986-10-26 00:00:00
Or this…
$date = str_replace('-', '/', $hiredate[$key]);
$date = date('d/m/Y g:ia', strtotime($date));