I have a date time in string with format Y-m-d H:i:s
like this:
$dateTime = '2018-07-06 18:53:21';
i want to conver it into dmy format, like this:
$convertedDateTime = $this->convertDateTime($dateTime);
echo $convertedDateTime;
and the result i expected from above echo
is 060718, how can i achieve this?