title: FROM UNIX TIME in Presto syntax
body: <p>I'm currently trying to collect data that falls between 2 dates via Unix timestamp. All of our dates are stored as VARCHARs to the CAST function is used.</p>
  
  <p>The line in my query reads as:</p>
  
  <pre><code>FROM_UNIXTIME(UNIX_TIMESTAMP(), '%Y %D %M %h:%i:%s %x') between 
  CAST(d.start_date AS TIMESTAMP) and CAST(d.end_date AS TIMESTAMP)
  </code></pre>
  
  <p>This returns as error:</p>
  
  <blockquote>
    <p>Function unix_timestamp not registered</p>
  </blockquote>
  
  <p>I also tried:</p>
  
  <pre><code>CAST(from_unixtime(unixtime) AS DATE) between 
  CAST(start_date AS DATE) and CAST(end_date AS DATE)     
  </code></pre>
  
  <p>This produces the error:</p>
  
  <blockquote>
    <p>Column <code>unixtime</code> cannot be resolved</p>
  </blockquote>
  
  <p>Any suggestions?    </p>