- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$start = '2016-10-19';
if ($start != '0000-00-00' and strtotime($start) > strtotime('now')) {
$start = strtotime($start);
}
echo date('Y-m-d', $start);