title: How to query the time in unix epoch timestamp in aws athena
body: <p>I have a simple table contains the <strong>node, message, starttime, endtime</strong> details where starttime and endtime are in unix timestamp. The query I am running is:</p>
  <pre><code>select node, message, (select from_unixtime(starttime)), (select from_unixtime(endtime)) from table1 WHERE try(select from_unixtime(starttime)) &gt; to_iso8601(current_timestamp - interval '24' hour) limit 100
  </code></pre>
  <p>The query is not working and throwing the syntax error.</p>
  <p>I am trying to fetch the following information from the table:</p>
  <ul>
  <li><p>query the table using start time and end time for past 'n' hours or 'n' days and get the output of starttime and endtime in human readable format</p>
  </li>
  <li><p>query the table using a specific date and time in human readable format</p>
  </li>
  </ul>