title: Getting time difference between two times in PHP
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/365191/how-to-get-time-difference-in-minutes-in-php">How to get time difference in minutes in PHP</a>  </p>
  </blockquote>
  
  
  
  <p>I am working on an attendance table to calculate the late and very late employees.
  I am storing the login time in the table (Type: time).  I am able to get the time from the database and i would like to show the time difference in the separate column.  </p>
  
  <p>i.e., if employee logged on or before <code>09:00:59</code>, then its right time and the time diff should be shown as null.  If he logs in after the time i.e, <code>09:01:00</code> or later the time difference should be <code>00:00:01</code>.  Like wise i need to calculate the differences in time.</p>
  
  <p>One time is constant i.e., <code>09:00:59</code> and another one i am getting from database table. Need to get diff between both.
  I am working in PHP.
  Hope my question is clear.</p>
  
  <p>Thank you in Advance.</p>