title: Mysql double to datetime
body: <p>I have a row of dates that are stored as double 778867200000 and I now need to convert them  to datetime. I don't want to try to convert them in the same row just in case it goes wrong. Therefore I've added a new row and default is NULL.</p>
  
  <p>I've tried a few combinations to achieve what I'm looking for  but with no luck.</p>
  
  <p>Here's the type of thing I've been trying...</p>
  
  <pre><code> UPDATE daily_quotes t, (SELECT DISTINCT id, date
                      FROM daily_quotes
                     WHERE id BETWEEN 1 AND 5) t1
  SET t.unix_date = CONVERT(t1.date, DATETIME)
  WHERE t.id = t1.id
  </code></pre>
  
  <p>Can anybody offer a solution?</p>
  
  <p>Thanks</p>
  
  <p>Steve</p>
  
  <p>PS: I'm just restricting it to 1-5 for testing  purposes. I actually have over 300k records.</p>