title: How to convert epoch to datetime redshift?
body: <p>I work in dbeaver. I have a table x. </p>
  
  <p>TABLE x has a column "timestamp" </p>
  
  <pre><code>1464800406459 
  1464800400452 
  1464800414056 
  1464800422854 
  1464800411797
  </code></pre>
  
  <p>The result I want:</p>
  
  <pre><code>Wed, 01 Jun 2016 17:00:06.459 GMT
  Wed, 01 Jun 2016 17:00:00.452 GMT
  Wed, 01 Jun 2016 17:00:14.056 GMT
  Wed, 01 Jun 2016 17:00:22.854 GMT 
  Wed, 01 Jun 2016 17:00:11.797 GMT 
  </code></pre>
  
  <p>I tried redshift query </p>
  
  <pre><code>SELECT FROM_UNIXTIME(x.timestamp) as x_date_time 
  FROM x
  </code></pre>
  
  <p>but didn't work.</p>
  
  <p>Error occurred:</p>
  
  <blockquote>
    <p>Invalid operation: function from_unixtime(character varying) does not exist</p>
  </blockquote>
  
  <p>I also tried </p>
  
  <pre><code>SELECT DATE_FORMAT(x.timestamp, '%d/%m/%Y') as x_date 
  FROM x
  </code></pre>
  
  <p>Error occurred: </p>
  
  <blockquote>
    <p>Invalid operation: function date_format(character varying, "unknown") does not exist</p>
  </blockquote>
  
  <p>Is there any wrong with the syntax? Or is there another way to convert to human readable date and time?</p>
  
  <p>Thanks in advance</p>