<?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: Find the Beginning Date of a Week in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Find-the-Beginning-Date-of-a-Week/m-p/599193#M16462</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;e=intnx("week.7",x,0,"B")&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 24 Oct 2019 22:09:47 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-10-24T22:09:47Z</dc:date>
    <item>
      <title>Find the Beginning Date of a Week</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Find-the-Beginning-Date-of-a-Week/m-p/599185#M16455</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to find the Week Begin Date from a Given Date with Saturday as the Starting point. I've tried the following code but it always yields a Sunday Start Date. I would like x=24Oct2019 to return&amp;nbsp;&amp;nbsp;10/20/19&amp;nbsp; (Saturday) &amp;amp; 26Oct2019 to return 10/26/19&amp;nbsp;(Also Saturday).&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;x='24Oct2019'd;&lt;/P&gt;&lt;P&gt;e=intnx("week",x,0,"B")&lt;/P&gt;&lt;P&gt;put e=;&lt;/P&gt;&lt;P&gt;format e mmddyy10;&lt;/P&gt;&lt;P&gt;run;&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>Thu, 24 Oct 2019 21:58:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Find-the-Beginning-Date-of-a-Week/m-p/599185#M16455</guid>
      <dc:creator>RADAGBE9</dc:creator>
      <dc:date>2019-10-24T21:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Find the Beginning Date of a Week</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Find-the-Beginning-Date-of-a-Week/m-p/599192#M16461</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
do x='20Oct2019'd to '30Oct2019'd;
	e=intnx("week.7",x,0,"B");
	put (x e) (+1 yymmdd10.);
	end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;  2019-10-20 2019-10-19
  2019-10-21 2019-10-19
  2019-10-22 2019-10-19
  2019-10-23 2019-10-19
  2019-10-24 2019-10-19
  2019-10-25 2019-10-19
  2019-10-26 2019-10-26
  2019-10-27 2019-10-26
  2019-10-28 2019-10-26
  2019-10-29 2019-10-26
  2019-10-30 2019-10-26&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Oct 2019 22:08:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Find-the-Beginning-Date-of-a-Week/m-p/599192#M16461</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-10-24T22:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Find the Beginning Date of a Week</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Find-the-Beginning-Date-of-a-Week/m-p/599193#M16462</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;e=intnx("week.7",x,0,"B")&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Oct 2019 22:09:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Find-the-Beginning-Date-of-a-Week/m-p/599193#M16462</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-10-24T22:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: Find the Beginning Date of a Week</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Find-the-Beginning-Date-of-a-Week/m-p/599198#M16465</link>
      <description>&lt;P&gt;Thanks. Worked Perfectly.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 22:19:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Find-the-Beginning-Date-of-a-Week/m-p/599198#M16465</guid>
      <dc:creator>RADAGBE9</dc:creator>
      <dc:date>2019-10-24T22:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: Find the Beginning Date of a Week</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Find-the-Beginning-Date-of-a-Week/m-p/599217#M16468</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
do x='20Oct2019'd to '30Oct2019'd;
	e=intnx("week.7",x,0,"B");
	put (x e) (+1 yymmdd10.);
	end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;  2019-10-20 2019-10-19
  2019-10-21 2019-10-19
  2019-10-22 2019-10-19
  2019-10-23 2019-10-19
  2019-10-24 2019-10-19
  2019-10-25 2019-10-19
  2019-10-26 2019-10-26
  2019-10-27 2019-10-26
  2019-10-28 2019-10-26
  2019-10-29 2019-10-26
  2019-10-30 2019-10-26&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Just a curiosity question. What does this line do?&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;	&lt;SPAN class="token keyword"&gt;put&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;x e&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;+&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt; yymmdd10&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I know that put will conver num to char, but I don't understand the "+1"?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2019 02:42:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Find-the-Beginning-Date-of-a-Week/m-p/599217#M16468</guid>
      <dc:creator>jpprovost</dc:creator>
      <dc:date>2019-10-25T02:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: Find the Beginning Date of a Week</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Find-the-Beginning-Date-of-a-Week/m-p/599220#M16469</link>
      <description>&lt;P&gt;The +1 adds a space character. Try removing it! &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2019 02:48:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Find-the-Beginning-Date-of-a-Week/m-p/599220#M16469</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-10-25T02:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Find the Beginning Date of a Week</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Find-the-Beginning-Date-of-a-Week/m-p/599222#M16470</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The +1 adds a space character. Try removing it! &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I'll for sure. There's so many "behind the scene" tricks with SAS that I don't know. I didn't know that you can use put (var1 var2) (format) in that way.&lt;/P&gt;
&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2019 02:51:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Find-the-Beginning-Date-of-a-Week/m-p/599222#M16470</guid>
      <dc:creator>jpprovost</dc:creator>
      <dc:date>2019-10-25T02:51:06Z</dc:date>
    </item>
  </channel>
</rss>

