<?php $dateBasicObj = DateTime::createFromFormat('dd M Y', '29 Jun 2017'); // comes as 29 Jun 2017 $dateExtendedStr = date('d-m-Y', $dateBasicObj->getTimestamp()); // need it as 29-06-2017 using 'd-m-Y'
You have javascript disabled. You will not be able to edit any code.