Question: how to change input type date format to yyyy-mm-dd in php?
Answer: <? php. $orgDate = "17-07-2012"; $date = str_replace('-"', '/', $orgDate); $newDate = date("Y/m/d", strtotime($date)); echo "New date format is: ". $newDate. " (YYYY/MM/DD)"; ?>