title: Mean time between dates
body: <p>I have a list of submissions.  Each submission has a <code>created_at</code> and <code>updated_at</code> timestamp.  I can do something like this to get the dates</p>
  
  <pre><code>foreach ($submissions as $submission) {
      var_dump($submission-&gt;created_at);
      var_dump($submission-&gt;updated_at);
  }
  </code></pre>
  
  <p>Say submission one has the <code>created_at</code> timestamp of <code>2017-07-29 23:14:02.000000</code> and an <code>updated_at</code> timestamp of <code>2017-07-29 23:16:02.000000</code> I know that this submission took 2 minutes to complete.</p>
  
  <p>What I am trying to calculate is the mean time for all submissions.  </p>
  
  <p>Is there any way to achieve this without creating several arrays?</p>
  
  <p>Thanks</p>
  
  <p>and</p>