<?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 Changing week variable in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Changing-week-variable/m-p/175446#M13475</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When assigning week variables in SAS EG, how can I set a week as Thursday-Wednesday rather than the default Sunday-Saturday?&amp;nbsp; Our production week begins on Thursday.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 May 2014 16:02:49 GMT</pubDate>
    <dc:creator>claireluen</dc:creator>
    <dc:date>2014-05-28T16:02:49Z</dc:date>
    <item>
      <title>Changing week variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Changing-week-variable/m-p/175446#M13475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When assigning week variables in SAS EG, how can I set a week as Thursday-Wednesday rather than the default Sunday-Saturday?&amp;nbsp; Our production week begins on Thursday.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 16:02:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Changing-week-variable/m-p/175446#M13475</guid>
      <dc:creator>claireluen</dc:creator>
      <dc:date>2014-05-28T16:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: Changing week variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Changing-week-variable/m-p/175447#M13476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How are you assingning week now?&amp;nbsp; Assuming January 1st is not a Thursday, do you want a value of 0 until the first Thursday, and then increment week numbers after that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps something like below, which counts how many Thursdays have passed since January first:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data have;
&amp;nbsp; do date="01Jan2014"d to "31Dec2014"d;
&amp;nbsp;&amp;nbsp;&amp;nbsp; output;
&amp;nbsp; end;
&amp;nbsp; format date mmddyy10.;
run;

data want;
&amp;nbsp; set have;
&amp;nbsp; weekNum=intck('week.5'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,intnx('year',date,0,'B')-1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,date
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );
run;
proc freq data=want;
&amp;nbsp; tables date*WeekNum/missing list;
run;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 17:41:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Changing-week-variable/m-p/175447#M13476</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2014-05-28T17:41:21Z</dc:date>
    </item>
  </channel>
</rss>

