title: Postgres/Redshift DATEDIFF convert to FLOAT
body: <p>I am using Python SQLAlchemy to connect to a Redshift instance. I am trying to calculate a DATEDIFF in minutes between 2 datetimes, which works. But when I try to CAST the result to FLOAT and use it in a CASE WHEN against ' &lt; 1' , I get only 'THEN' results?</p>
  
  <pre><code>SELECT distinct u2.id,
    CASE 
      WHEN 
        CAST(DATEDIFF(minute, u1.usa_start_datetime::timestamp,u1.usa_end_datetime::timestamp) * 1.00 as FLOAT) &lt; 1.00 
        THEN 1.00 END as fsess_hr,
  </code></pre>