<?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: Identifying Weekend date from a given date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Identifying-Weekend-date-from-a-given-date/m-p/15702#M2095</link>
    <description>the function INTNX() will provide the next date that satisfies the interval boundary you seek. There are lots of examples at the web page &lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a000990883.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a000990883.htm&lt;/A&gt; .&lt;BR /&gt;
 &lt;BR /&gt;
Whether you want next weekend (Friday/Saturday/Sunday), or last, you'll find an interval definition to suit.&lt;BR /&gt;
 &lt;BR /&gt;
PeterC</description>
    <pubDate>Mon, 06 Apr 2009 21:16:09 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-04-06T21:16:09Z</dc:date>
    <item>
      <title>Identifying Weekend date from a given date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identifying-Weekend-date-from-a-given-date/m-p/15701#M2094</link>
      <description>Wondering if someone could help me with the following problem. I have a dataset that contains a column called create date. Using this field I would like to identify the weekend date for any given create date. Any thoughts on how this could be done?</description>
      <pubDate>Mon, 06 Apr 2009 20:49:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identifying-Weekend-date-from-a-given-date/m-p/15701#M2094</guid>
      <dc:creator>SAS09</dc:creator>
      <dc:date>2009-04-06T20:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying Weekend date from a given date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identifying-Weekend-date-from-a-given-date/m-p/15702#M2095</link>
      <description>the function INTNX() will provide the next date that satisfies the interval boundary you seek. There are lots of examples at the web page &lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a000990883.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a000990883.htm&lt;/A&gt; .&lt;BR /&gt;
 &lt;BR /&gt;
Whether you want next weekend (Friday/Saturday/Sunday), or last, you'll find an interval definition to suit.&lt;BR /&gt;
 &lt;BR /&gt;
PeterC</description>
      <pubDate>Mon, 06 Apr 2009 21:16:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identifying-Weekend-date-from-a-given-date/m-p/15702#M2095</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-04-06T21:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying Weekend date from a given date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identifying-Weekend-date-from-a-given-date/m-p/15703#M2096</link>
      <description>Hi SAS09,&lt;BR /&gt;
A simple do loop with WEEKDAY function can also solve you problem.&lt;BR /&gt;
&lt;BR /&gt;
data dx;&lt;BR /&gt;
input cretdt YYMMDD10.;&lt;BR /&gt;
do i = 0 to 7 until(weekdaynum in(1,7)) ;&lt;BR /&gt;
weekdaynum=weekday(cretdt + i);&lt;BR /&gt;
weekend_date=cretdt+i;&lt;BR /&gt;
end;&lt;BR /&gt;
format cretdt weekend_date  YYMMDD10.;&lt;BR /&gt;
datalines;&lt;BR /&gt;
2009-04-03&lt;BR /&gt;
2009-04-09&lt;BR /&gt;
2009-04-15&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
proc print;run;</description>
      <pubDate>Wed, 08 Apr 2009 21:00:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identifying-Weekend-date-from-a-given-date/m-p/15703#M2096</guid>
      <dc:creator>SushilNayak</dc:creator>
      <dc:date>2009-04-08T21:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying Weekend date from a given date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identifying-Weekend-date-from-a-given-date/m-p/15704#M2097</link>
      <description>To Sushil: I recommend you consider reading up on the much simpler approach, using the INTNX function, where the desired result can be generated in one assignment statement, given any SAS date variable.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 09 Apr 2009 00:14:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identifying-Weekend-date-from-a-given-date/m-p/15704#M2097</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-04-09T00:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying Weekend date from a given date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identifying-Weekend-date-from-a-given-date/m-p/15705#M2098</link>
      <description>Peter,&lt;BR /&gt;
&lt;BR /&gt;
The INTNX() worked beautifully! Thank you for your suggestion .&lt;BR /&gt;
&lt;BR /&gt;
AJ</description>
      <pubDate>Thu, 09 Apr 2009 12:42:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identifying-Weekend-date-from-a-given-date/m-p/15705#M2098</guid>
      <dc:creator>SAS09</dc:creator>
      <dc:date>2009-04-09T12:42:47Z</dc:date>
    </item>
  </channel>
</rss>

