How to Change Datetime Format in an MySQL Table
<p>Format datetime in Mysql existing table</p>

<p><b>First issue:</b><br></p>

<p>in mysql table, some of datetime are in 'Y-m-d H:01:00' format.</p>

<p>i would like format them in 'Y-m-d H:00:00' format.</p>

<p><b>Second issue:</b><br></p>

<p>in an another table, i would like format the existing datetime to the closest 'Y-m-d H:05:00' or 'Y-m-d H:10:00' or 'Y-m-d H:15:00' or 'Y-m-d H:20:00'....</p>

<p>How could i change the datas in the mySql Table?</p>

<p><b>Update:</b></p>

<p>I found for the first issue : </p>

<pre><code>UPDATE `table` SET timeStamp = date_format(timeStamp,'%Y-%m-%d %H:00:00') 
</code></pre>