<?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: How to calculate last sunday of month in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-last-sunday-of-month/m-p/625076#M184213</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Learned something new &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Looks like there is a SAS function for almost everything. ....hopefully we will also get "call zero()/call value()" one day.&lt;/P&gt;</description>
    <pubDate>Sun, 16 Feb 2020 08:21:23 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2020-02-16T08:21:23Z</dc:date>
    <item>
      <title>How to calculate last sunday of month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-last-sunday-of-month/m-p/625065#M184202</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to locate the last sunday of month but I am confused whether the following syntax is correct or not.&lt;/P&gt;&lt;P&gt;or there is any other way to locate it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;last sunday=INTNX ('WEEK', INTNX('MONTH', TODAY() , 0, 'E') , 0 , 'B')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please if you could help here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2020 07:13:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-last-sunday-of-month/m-p/625065#M184202</guid>
      <dc:creator>Brad39</dc:creator>
      <dc:date>2020-02-16T07:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate last sunday of month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-last-sunday-of-month/m-p/625067#M184204</link>
      <description>&lt;P&gt;Looks good to me.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You take a date and shift it forward to the last day of the month. Then you shift that last day of the month back to the first day of the week the last day of the month is in. With SAS the first day of the week is Sunday.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2020 08:31:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-last-sunday-of-month/m-p/625067#M184204</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-02-16T08:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate last sunday of month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-last-sunday-of-month/m-p/625073#M184210</link>
      <description>&lt;P&gt;Thank alot&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2020 08:17:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-last-sunday-of-month/m-p/625073#M184210</guid>
      <dc:creator>Brad39</dc:creator>
      <dc:date>2020-02-16T08:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate last sunday of month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-last-sunday-of-month/m-p/625074#M184211</link>
      <description>&lt;P&gt;Or try another function : NWKDOM(n, weekday, month, year)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;last_sunday=nwkdom( 5 , 1, 2 , 2020) ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-- 5 is for the last week within a month&lt;/P&gt;
&lt;P&gt;-- 1 is for sunday&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2020 08:17:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-last-sunday-of-month/m-p/625074#M184211</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-02-16T08:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate last sunday of month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-last-sunday-of-month/m-p/625076#M184213</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Learned something new &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Looks like there is a SAS function for almost everything. ....hopefully we will also get "call zero()/call value()" one day.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2020 08:21:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-last-sunday-of-month/m-p/625076#M184213</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-02-16T08:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate last sunday of month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-last-sunday-of-month/m-p/625079#M184216</link>
      <description>&lt;P&gt;Patrick,&lt;/P&gt;
&lt;P&gt;OP's statement is also brilliant , which remind me to learn this idea from yours .&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2020 08:28:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-last-sunday-of-month/m-p/625079#M184216</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-02-16T08:28:47Z</dc:date>
    </item>
  </channel>
</rss>

