title: Datetime to Integer
body: <p>I have one problem... There is a table in my MySQL database that stores to-do list entries inside a JQuery-type calendar.<br>
  I had to generate a <code>calendar_id</code> that will generate a reminder once I created timestamp (considered as time I clicked on any of the calender dateboxes, to key in some  to-do tasks - put it simple: created datetime).</p>
  
  <p>This to-do list activities app is an external application that I've been working on to integrate with my own management system. I noticed that,the timestamp column is in <code>int(11)</code> format, so whatever timestamp entered will be converted into integer.</p>
  
  <p>For example, take a look at this: </p>
  
  <pre><code>2012-02-22 15:31:24
  </code></pre>
  
  <p>converted to </p>
  
  <pre><code>1329899400
  </code></pre>
  
  <p>How can we convert datetime to this format? It's not in seconds when I tried:</p>
  
  <pre><code>intval(floor($datetime/86400));
  </code></pre>
  
  <p>Any help?</p>