title: Unix timestamp vs datetime
body: <blockquote>
  <p><strong>Possible Duplicate:</strong><br />
  <a href="https://stackoverflow.com/questions/409286/datetime-vs-timestamp">Datetime vs Timestamp?</a></p>
  </blockquote>
  
  <p>I have a Mysql table, which has a column <code>add_date</code>. It tracks the date/time when the record was added to the database.</p>
  <p>Queries based on this table:</p>
  <ol>
  <li>Display when the record was added in the format: 2 hours ago, 4 weeks ago, 1 year ago etc</li>
  <li>Allow users to search records inserted in any day/month/year. So the user may be allowed to choose to see the records inserted in 2009 only.</li>
  </ol>
  <p>Which would be better in this case - unix timestamp or datetime?</p>
  <p>Right now I'm using both, but since the table will have millions of records over time, having both columns may affect the size of the database.</p>
  <p>Unix timestamp seem to be better for conversion to <code>2 hours</code> ago format in PHP and also it is timezone independent. But datetime has better readability and making a query for a particular date/time/year seems easier.</p>
  <p>Your suggestion?</p>