title: Amazon Athena time date as string column
body: <p>Athena partition are by year/month/date and is being imported as STRING column by GLUE.So day is a type string. My requirement is extract the day from the current time stamp and compare to my day column/partition. </p>
  
  <pre><code>SELECT *
  FROM "db1"."tbl1"
  WHERE year = cast(extract(year from (CURRENT_DATE - interval '7' day)) as varchar) 
  AND month = lpad(cast(extract(month from (CURRENT_DATE - interval '7' day)) as varchar),2,'0') 
  AND day = lpad(cast(extract(day from (CURRENT_DATE - interval '7' day)) as varchar),2,'0') 
  limit 10
  </code></pre>
  
  <p>This extracts single day . I want all days between now and past 7 days.</p>