phpCopy$oldDate = strtotime('03/08/2020'); $newDate = date('Y-m-d',$time); echo $newDate; //output: 2020-03-08