<?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: ID the day of week in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597556#M172187</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19504"&gt;@BETO&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Now that i id week 1 of the month is there a way to get it to sure it by date range for example &lt;BR /&gt;Date sales &lt;BR /&gt;09/03/19 - 09/06/19. $0000.00&lt;BR /&gt;09/09/19 - 09/13/19. $0000.00&lt;BR /&gt;09/16/19 - 09/20/19 $00000.00&lt;BR /&gt;09/23/19 - 09/27/19. $00000.00&lt;BR /&gt;&lt;BR /&gt;The data looks like this &lt;BR /&gt;Date. Sales &lt;BR /&gt;09/09/19. 0000&lt;BR /&gt;09/10/19. 0000&lt;BR /&gt;09/13/19. 0000&lt;BR /&gt;09/15/19. 0000&lt;BR /&gt;09/16/19: 0000&lt;BR /&gt;09/24/19. 0000&lt;BR /&gt;09/27/19. 0000&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where does this interval come from?&lt;/P&gt;
&lt;P&gt;09/03/19 - 09/06/19?&lt;/P&gt;
&lt;P&gt;I think you may be excluding holidays now but have not explicitly stated that anywhere.&lt;/P&gt;
&lt;P&gt;So what "interval" would expect for values in the first week of July 2019 where July 4 is a holiday that appears on Thursday??, or Christmas, New Years as other holidays that change day of the week?&amp;nbsp;or Thanksgiving that is always a Thursday.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think your "interval" display needs some additional description, rules and example in an out data. The example "have" data is easy. Here is a calendar worth:&lt;/P&gt;
&lt;PRE&gt;data have;
  do date= '01Jan2019'd to '31Dec2019'd;
     output;
  end;
  format date date9.;
run;&lt;/PRE&gt;
&lt;P&gt;Now provide examples of the interval value for each of those dates.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Oct 2019 22:46:28 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-10-17T22:46:28Z</dc:date>
    <item>
      <title>ID the day of week</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597332#M172097</link>
      <description>I have a code that Id the day of week but its not working here is what i have &lt;BR /&gt;&lt;BR /&gt;Data want;&lt;BR /&gt;Set have;&lt;BR /&gt;Retain weekno 0;&lt;BR /&gt;Length weektext $30;&lt;BR /&gt;If weekday (date)=1 then weekno+1;&lt;BR /&gt;If weekno&amp;gt;0 then weektext="week" !! Strip(put(weekno,2.))!! " " !! Strip(put(date,monname.));&lt;BR /&gt;My date  is formatted  yymmddd10. &lt;BR /&gt;When i run code the output is 0 for all entries  im pulling month worth of data ...thanks for assistance</description>
      <pubDate>Thu, 17 Oct 2019 14:05:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597332#M172097</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2019-10-17T14:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: ID the day of week</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597333#M172098</link>
      <description>&lt;P&gt;This problem seems easier with the &lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=n1ka2ulrvrjlasn0z7beco2yrgas.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;Week Function&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 14:08:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597333#M172098</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-10-17T14:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: ID the day of week</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597335#M172100</link>
      <description>Thanks for the quick response the reason why i am using weekday is because i will be reporting on performance by 1st week of the month 2nd week of the month 3rd week and 4th</description>
      <pubDate>Thu, 17 Oct 2019 14:16:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597335#M172100</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2019-10-17T14:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: ID the day of week</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597379#M172111</link>
      <description>&lt;P&gt;"Not working" is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&lt;/A&gt;... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 15:04:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597379#M172111</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-10-17T15:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: ID the day of week</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597382#M172114</link>
      <description>There are no errors in the log   i tried this and it gave me what i needed &lt;BR /&gt;Data table;&lt;BR /&gt;Set table:&lt;BR /&gt;Week=intck('week',intnx('month',day,0) ,day) +1;&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Oct 2019 15:12:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597382#M172114</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2019-10-17T15:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: ID the day of week</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597383#M172115</link>
      <description>Fyi cant post copy and paste code  work restrictions</description>
      <pubDate>Thu, 17 Oct 2019 15:13:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597383#M172115</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2019-10-17T15:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: ID the day of week</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597386#M172116</link>
      <description>&lt;P&gt;Perhaps you can make up synthetic data to&amp;nbsp; reproduce the problem, with a log you can publish.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 15:17:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597386#M172116</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2019-10-17T15:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: ID the day of week</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597391#M172121</link>
      <description>Now that i id week 1 of the month is there a way to get it to sure it by date range for example &lt;BR /&gt;Date                                     sales &lt;BR /&gt;09/03/19 - 09/06/19.  $0000.00&lt;BR /&gt;09/09/19 - 09/13/19.    $0000.00&lt;BR /&gt;09/16/19 - 09/20/19  $00000.00&lt;BR /&gt;09/23/19 - 09/27/19. $00000.00&lt;BR /&gt; &lt;BR /&gt;The data looks like this &lt;BR /&gt;Date.              Sales &lt;BR /&gt;09/09/19.       0000&lt;BR /&gt;09/10/19.     0000&lt;BR /&gt;09/13/19.    0000&lt;BR /&gt;09/15/19.   0000&lt;BR /&gt;09/16/19:  0000&lt;BR /&gt;09/24/19.  0000&lt;BR /&gt;09/27/19.  0000&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Oct 2019 15:24:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597391#M172121</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2019-10-17T15:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: ID the day of week</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597502#M172166</link>
      <description>How are your weeks of the month calculated? Ie is it first 7 days of the month = first week, day 8 to 14 is second week? If so, use day of MONTH and MOD() to get the week number pretty easily.</description>
      <pubDate>Thu, 17 Oct 2019 20:52:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597502#M172166</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-10-17T20:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: ID the day of week</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597556#M172187</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19504"&gt;@BETO&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Now that i id week 1 of the month is there a way to get it to sure it by date range for example &lt;BR /&gt;Date sales &lt;BR /&gt;09/03/19 - 09/06/19. $0000.00&lt;BR /&gt;09/09/19 - 09/13/19. $0000.00&lt;BR /&gt;09/16/19 - 09/20/19 $00000.00&lt;BR /&gt;09/23/19 - 09/27/19. $00000.00&lt;BR /&gt;&lt;BR /&gt;The data looks like this &lt;BR /&gt;Date. Sales &lt;BR /&gt;09/09/19. 0000&lt;BR /&gt;09/10/19. 0000&lt;BR /&gt;09/13/19. 0000&lt;BR /&gt;09/15/19. 0000&lt;BR /&gt;09/16/19: 0000&lt;BR /&gt;09/24/19. 0000&lt;BR /&gt;09/27/19. 0000&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where does this interval come from?&lt;/P&gt;
&lt;P&gt;09/03/19 - 09/06/19?&lt;/P&gt;
&lt;P&gt;I think you may be excluding holidays now but have not explicitly stated that anywhere.&lt;/P&gt;
&lt;P&gt;So what "interval" would expect for values in the first week of July 2019 where July 4 is a holiday that appears on Thursday??, or Christmas, New Years as other holidays that change day of the week?&amp;nbsp;or Thanksgiving that is always a Thursday.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think your "interval" display needs some additional description, rules and example in an out data. The example "have" data is easy. Here is a calendar worth:&lt;/P&gt;
&lt;PRE&gt;data have;
  do date= '01Jan2019'd to '31Dec2019'd;
     output;
  end;
  format date date9.;
run;&lt;/PRE&gt;
&lt;P&gt;Now provide examples of the interval value for each of those dates.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 22:46:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ID-the-day-of-week/m-p/597556#M172187</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-10-17T22:46:28Z</dc:date>
    </item>
  </channel>
</rss>

