<?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: Weekday Range from a given date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Weekday-Range-from-a-given-date/m-p/479263#M286486</link>
    <description>&lt;P&gt;All of these answers are sniffing in the right direction.&amp;nbsp; But you'll need to clarify the problem a bit.&amp;nbsp; What should the result be for these run dates?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;7/20/2018&lt;/P&gt;
&lt;P&gt;7/21/2018&lt;/P&gt;
&lt;P&gt;7/22/2018&lt;/P&gt;</description>
    <pubDate>Wed, 18 Jul 2018 20:29:53 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2018-07-18T20:29:53Z</dc:date>
    <item>
      <title>Weekday Range from a given date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Weekday-Range-from-a-given-date/m-p/479194#M286482</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've a table with "run date" field. Can anyone let me know how I can create a date range field?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;If Run date is 7/18/2018 then in the weekday range column I need to show the value "7/15/2018-7/21/2018"&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for all the help!!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 18:40:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Weekday-Range-from-a-given-date/m-p/479194#M286482</guid>
      <dc:creator>SteelersPitts</dc:creator>
      <dc:date>2018-07-18T18:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Weekday Range from a given date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Weekday-Range-from-a-given-date/m-p/479195#M286483</link>
      <description>Use INTNX function to add/subtract days from the run date.</description>
      <pubDate>Wed, 18 Jul 2018 18:46:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Weekday-Range-from-a-given-date/m-p/479195#M286483</guid>
      <dc:creator>tomrvincent</dc:creator>
      <dc:date>2018-07-18T18:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Weekday Range from a given date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Weekday-Range-from-a-given-date/m-p/479200#M286484</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data w;
k='18jul2018'd;
range=catx('-',put(intnx('WEEK',k,0,'b'),mmddyy10.),put(intnx('week',k,0,'e'),mmddyy10.));
format k mmddyy10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Jul 2018 18:51:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Weekday-Range-from-a-given-date/m-p/479200#M286484</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-07-18T18:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Weekday Range from a given date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Weekday-Range-from-a-given-date/m-p/479212#M286485</link>
      <description>&lt;P&gt;You need CATX and the INTNX functions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The last parameter in the INTNX function is the alignment parameter. That tells SAS to return the beginning of a week or end of a week for example. So setting the interval to 0, means find the first and last of the week with the b/e alignment options.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp;code illustrates this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/175426"&gt;@SteelersPitts&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've a table with "run date" field. Can anyone let me know how I can create a date range field?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;If Run date is 7/18/2018 then in the weekday range column I need to show the value "7/15/2018-7/21/2018"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for all the help!!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 18:56:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Weekday-Range-from-a-given-date/m-p/479212#M286485</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-07-18T18:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Weekday Range from a given date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Weekday-Range-from-a-given-date/m-p/479263#M286486</link>
      <description>&lt;P&gt;All of these answers are sniffing in the right direction.&amp;nbsp; But you'll need to clarify the problem a bit.&amp;nbsp; What should the result be for these run dates?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;7/20/2018&lt;/P&gt;
&lt;P&gt;7/21/2018&lt;/P&gt;
&lt;P&gt;7/22/2018&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 20:29:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Weekday-Range-from-a-given-date/m-p/479263#M286486</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-07-18T20:29:53Z</dc:date>
    </item>
  </channel>
</rss>

