<?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>topic Re: Identify dates that fall in last week of the month in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Identify-dates-that-fall-in-last-week-of-the-month/m-p/903930#M357141</link>
    <description>&lt;P&gt;Thanks you so much &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;Ksharp.&amp;nbsp; This is exactly what I was looking for.&amp;nbsp; To be able to identify the start date of the last week of the month.&amp;nbsp; I wasn't aware of the NWKDOM function.&amp;nbsp; Than you for bringing it to our attention!!!&lt;/P&gt;</description>
    <pubDate>Mon, 20 Nov 2023 15:31:16 GMT</pubDate>
    <dc:creator>PamG</dc:creator>
    <dc:date>2023-11-20T15:31:16Z</dc:date>
    <item>
      <title>Identify dates that fall in last week of the month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-dates-that-fall-in-last-week-of-the-month/m-p/903698#M357072</link>
      <description>&lt;P&gt;How do I identify dates that fall in the last week of the month?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;How do I identify dates that fall in the last week of the month?

DATA dates;
INPUT startdt :mmddyy10.;
FORMAT startdt mmddyy10.;
DATALINES;
12/01/2000
09/30/2012
06/01/2001
09/01/2001
09/30/2018
09/30/2018
04/30/2017
;
RUN;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 17:37:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-dates-that-fall-in-last-week-of-the-month/m-p/903698#M357072</guid>
      <dc:creator>PamG</dc:creator>
      <dc:date>2023-11-17T17:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Identify dates that fall in last week of the month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-dates-that-fall-in-last-week-of-the-month/m-p/903701#M357074</link>
      <description>&lt;P&gt;Please let us know how you define "week". Does it start on Saturday, or Sunday, or Monday? Or do you mean last 7 days? Or do you mean something else?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please be specific and detailed.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 17:51:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-dates-that-fall-in-last-week-of-the-month/m-p/903701#M357074</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-11-17T17:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Identify dates that fall in last week of the month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-dates-that-fall-in-last-week-of-the-month/m-p/903705#M357076</link>
      <description>&lt;P&gt;If you mean the last 7 days of the month, here's a way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set have;
   if (intnx('month', startdt, 1) -7) &amp;lt;= startdt &amp;lt; intnx('month', startdt, 1);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Nov 2023 18:08:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-dates-that-fall-in-last-week-of-the-month/m-p/903705#M357076</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2023-11-17T18:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Identify dates that fall in last week of the month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-dates-that-fall-in-last-week-of-the-month/m-p/903707#M357077</link>
      <description>&lt;P&gt;Assuming last 7 days.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set dates;
in_last_7days = startdt &amp;gt;= intnx('month', startdt, 0, 'e') - 7;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Nov 2023 18:12:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-dates-that-fall-in-last-week-of-the-month/m-p/903707#M357077</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-11-17T18:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Identify dates that fall in last week of the month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-dates-that-fall-in-last-week-of-the-month/m-p/903763#M357091</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
DATA dates;
INPUT startdt :mmddyy10.;
first=nwkdom(5,2,month(startdt),year(startdt));
in_last_week=(startdt&amp;gt;=first);
FORMAT first startdt mmddyy10.;
DATALINES;
12/01/2000
09/30/2012
06/01/2001
09/01/2001
09/30/2018
09/30/2018
04/30/2017
;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 18 Nov 2023 10:39:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-dates-that-fall-in-last-week-of-the-month/m-p/903763#M357091</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-11-18T10:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Identify dates that fall in last week of the month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-dates-that-fall-in-last-week-of-the-month/m-p/903930#M357141</link>
      <description>&lt;P&gt;Thanks you so much &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;Ksharp.&amp;nbsp; This is exactly what I was looking for.&amp;nbsp; To be able to identify the start date of the last week of the month.&amp;nbsp; I wasn't aware of the NWKDOM function.&amp;nbsp; Than you for bringing it to our attention!!!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 15:31:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-dates-that-fall-in-last-week-of-the-month/m-p/903930#M357141</guid>
      <dc:creator>PamG</dc:creator>
      <dc:date>2023-11-20T15:31:16Z</dc:date>
    </item>
  </channel>
</rss>

