title: Catchable fatal error: Object of class DateTime could not be converted to string
body: <p>here is my array i get </p>
  
  <pre><code> Array
  (
  [0] =&gt; BugHerd_Project Object
  (
      [id:BugHerd_Project:private] =&gt; 24323
      [name:BugHerd_Project:private] =&gt; bugherd a
      [devurl:BugHerd_Project:private] =&gt; http://st.com/a/
      [active:BugHerd_Project:private] =&gt; 1
      [created:BugHerd_Project:private] =&gt; DateTime Object
          (
              [date] =&gt; 2014-05-03 11:15:22
              [timezone_type] =&gt; 2
              [timezone] =&gt; Z
          )
  
      [updated:BugHerd_Project:private] =&gt; DateTime Object
          (
              [date] =&gt; 2014-05-05 06:55:52
              [timezone_type] =&gt; 2
              [timezone] =&gt; Z
          )
  
  )
  </code></pre>
  
  <p>)</p>
  
  <p>/**
     * Gets date the project was last created
     * @return DateTime Project creation date
     */</p>
  
  <pre><code>public function getCreated() {
  return $this-&gt;created;
   }
  </code></pre>
  
  <ul>
  <li><p>i have written below code for to access date from array</p>
  
  <p>on doing print_r($projects_particular->getCreated());</p>
  
  <p>output of array is here :</p>
  
  <pre><code>  DateTime Object
   (
   [date] =&gt; 2014-05-05 10:04:30
  [timezone_type] =&gt; 2
  [timezone] =&gt; Z
    )
  </code></pre>
  
  <p>i recived error:Catchable fatal error: Object of class DateTime could not be converted to string</p>
  
  <ul>
  <li>im just want to access date.</li>
  </ul></li>
  </ul>