I am using an HTML 5 form on an iPhone. This form has an input element like the following:
W
The following should do it.
$dat = new DateTime($_POST['MyDATE']); $new_format = $dat->format('Y-m-d');