title: DateTime Object to string
body: <p>When I pull birthday date from the Facebook SKD I get DateTime Object, and I have been struggling convert it to string.</p>
  
  <pre><code>print_r($birthday);
  </code></pre>
  
  <blockquote>
    <p>DateTime Object ( [date] => 1978-03-09 00:00:00.000000 [timezone_type] => 3 [timezone] => Europe/Berlin )</p>
  </blockquote>
  
  <p>But when i try to create another DateTime Object and convert it over to string </p>
  
  <pre><code>$date = new DateTime($birthday-&gt;date);
  $result = $date-&gt;format('Y-m-d H:i:s');
  </code></pre>
  
  <p>I get</p>
  
  <blockquote>
    <p>Undefined prperty: DateTime::$date </p>
  </blockquote>
  
  <p>And when I </p>
  
  <pre><code>$date = new DateTime($birthday['date']);
  $result = $date-&gt;format('Y-m-d H:i:s');
  </code></pre>
  
  <blockquote>
    <p>Cannot use object of type DateTime as array</p>
  </blockquote>