title: How to convert data type varchar to timestamp mysql?
body: <p>I have database mysql with table 'tblevel' with column 'waktu' with varchar data type.
  and the column hold values like this:</p>
  
  <p><code>30-01-2014 12:19:09</code></p>
  
  <p>The value will be converted to timestamp, because I have to do that for data viewing in graphic, in this case I use google data visualisation,</p>
  
  <p>The shorted code is :</p>
  
  <pre><code>$result = mysql_query("SELECT TIMESTAMPDIFF(MINUTE,FROM_UNIX_TIMESTAMP(STR_TO_DATE(waktu, '%H:%i:%s %b %d, %Y')), now()) as waktu1,level,press FROM tblevel WHERE TIMESTAMPDIFF(MINUTE,FROM_UNIXTIME(waktu) , now()) &lt; 120 Order By waktu"); 
  </code></pre>
  
  <p>hope someone help to correct the code .thanks<br>
  regards Fixduino.</p>