title: presto - getting days interval (not date)
body: <p>How do I get the days interval for prestodb? I can convert to milliseconds and convert these to number of days but I am looking if there is any shorter way to do this.</p>
  
  <p>Example: I want to see how many days has it been since the first row inserted in a table.</p>
  
  <pre><code>SELECT 
      to_milliseconds(date(current_date) - min(created)) / (1000*60*60*24) as days_since_first_row
  FROM
      some_table
  </code></pre>
  
  <p>What I am hoping to see: (Either 1 of below)</p>
  
  <pre><code> SELECT 
          to_days(date(current_date) - min(created)) / (1000*60*60*24) as days_since_first_row
          ,cast(date(current_date) - min(created)) as days) as days_since_first_row2
      FROM
          some_table
  </code></pre>