php:get only date from timestamp SQL
<p>Currently I have a datetime like this:</p>

<pre><code>2012-07-24 11:52:01
</code></pre>

<p>Now i want to show only date like <code>2012-07-24</code>.</p>

<p>Can anyone give any php function?
Thanks.</p>