<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: last friday in impala in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/last-friday-in-impala/m-p/85451#M11682</link>
    <description>I am not sure if there are easier ways, but something like below might work:&lt;BR /&gt;&lt;BR /&gt;SELECT CASE DAYOFWEEK(NOW())&lt;BR /&gt;WHEN 1 THEN DAYS_SUB(NOW(), 2) -- Sunday, so Friday was 2 days ago&lt;BR /&gt;WHEN 2 THEN DAYS_SUB(NOW(), 3) -- Monday&lt;BR /&gt;WHEN 3 THEN DAYS_SUB(NOW(), 4) -- Tuesday&lt;BR /&gt;WHEN 4 THEN DAYS_SUB(NOW(), 5) -- Wednesday&lt;BR /&gt;WHEN 5 THEN DAYS_SUB(NOW(), 6) -- Thursday&lt;BR /&gt;WHEN 6 THEN DAYS_SUB(NOW(), 7) -- Friday&lt;BR /&gt;WHEN 7 THEN DAYS_SUB(NOW(), 1) -- Saturday, so Friday just the day before&lt;BR /&gt;END AS last_friday;&lt;BR /&gt;&lt;BR /&gt;If you just want the Friday from last week, regardless of which day you are on, then below might be easier:&lt;BR /&gt;&lt;BR /&gt;SELECT DAYS_SUB(NOW(), DAYOFWEEK(NOW()) +1) AS last_friday;&lt;BR /&gt;&lt;BR /&gt;Hope above helps.</description>
    <pubDate>Fri, 25 Jan 2019 03:46:23 GMT</pubDate>
    <dc:creator>EricL</dc:creator>
    <dc:date>2019-01-25T03:46:23Z</dc:date>
    <item>
      <title>last friday in impala</title>
      <link>https://community.cloudera.com/t5/Support-Questions/last-friday-in-impala/m-p/85374#M11681</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;how do i get&amp;nbsp;last Friday in&amp;nbsp; Impala?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 14:05:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/last-friday-in-impala/m-p/85374#M11681</guid>
      <dc:creator>Tome</dc:creator>
      <dc:date>2022-09-16T14:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: last friday in impala</title>
      <link>https://community.cloudera.com/t5/Support-Questions/last-friday-in-impala/m-p/85451#M11682</link>
      <description>I am not sure if there are easier ways, but something like below might work:&lt;BR /&gt;&lt;BR /&gt;SELECT CASE DAYOFWEEK(NOW())&lt;BR /&gt;WHEN 1 THEN DAYS_SUB(NOW(), 2) -- Sunday, so Friday was 2 days ago&lt;BR /&gt;WHEN 2 THEN DAYS_SUB(NOW(), 3) -- Monday&lt;BR /&gt;WHEN 3 THEN DAYS_SUB(NOW(), 4) -- Tuesday&lt;BR /&gt;WHEN 4 THEN DAYS_SUB(NOW(), 5) -- Wednesday&lt;BR /&gt;WHEN 5 THEN DAYS_SUB(NOW(), 6) -- Thursday&lt;BR /&gt;WHEN 6 THEN DAYS_SUB(NOW(), 7) -- Friday&lt;BR /&gt;WHEN 7 THEN DAYS_SUB(NOW(), 1) -- Saturday, so Friday just the day before&lt;BR /&gt;END AS last_friday;&lt;BR /&gt;&lt;BR /&gt;If you just want the Friday from last week, regardless of which day you are on, then below might be easier:&lt;BR /&gt;&lt;BR /&gt;SELECT DAYS_SUB(NOW(), DAYOFWEEK(NOW()) +1) AS last_friday;&lt;BR /&gt;&lt;BR /&gt;Hope above helps.</description>
      <pubDate>Fri, 25 Jan 2019 03:46:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/last-friday-in-impala/m-p/85451#M11682</guid>
      <dc:creator>EricL</dc:creator>
      <dc:date>2019-01-25T03:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: last friday in impala</title>
      <link>https://community.cloudera.com/t5/Support-Questions/last-friday-in-impala/m-p/85527#M11683</link>
      <description>&lt;P&gt;SELECT DAYS_SUB(NOW(), DAYOFWEEK(NOW()) +1) AS last_friday;&lt;/P&gt;&lt;P&gt;Thats&amp;nbsp; what i needed. Thank you!!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 04:01:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/last-friday-in-impala/m-p/85527#M11683</guid>
      <dc:creator>Tome</dc:creator>
      <dc:date>2019-01-28T04:01:10Z</dc:date>
    </item>
  </channel>
</rss>

