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