<?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 first date monday and last day friday in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/first-date-monday-and-last-day-friday/m-p/628409#M185682</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I can't resolve this problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I try to have for each given date, Monday as the start of the week and Friday as the day of the weekend.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The error is made on the first day of the month.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The following example illustrates the error. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   date = '03feb2020'd;
   firstday = intnx('week.2',date,-1);
   lastday  = intnx('week.6',date ,-1);
   put (date firstday lastday) (= date9.) ;
   
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Log&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 73         data _null_;
 74            date = '03feb2020'd;
 75            firstday = intnx('week.2',date,-1);
 76            lastday  = intnx('week.6',date ,-1);
 77            put (date firstday lastday) (= date9.) ;
 78         
 79         run;
 
 date=03FEB2020 firstday=27JAN2020 lastday=24JAN2020&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 29 Feb 2020 11:51:12 GMT</pubDate>
    <dc:creator>mansour_ib_sas</dc:creator>
    <dc:date>2020-02-29T11:51:12Z</dc:date>
    <item>
      <title>first date monday and last day friday</title>
      <link>https://communities.sas.com/t5/SAS-Programming/first-date-monday-and-last-day-friday/m-p/628409#M185682</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I can't resolve this problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I try to have for each given date, Monday as the start of the week and Friday as the day of the weekend.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The error is made on the first day of the month.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The following example illustrates the error. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   date = '03feb2020'd;
   firstday = intnx('week.2',date,-1);
   lastday  = intnx('week.6',date ,-1);
   put (date firstday lastday) (= date9.) ;
   
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Log&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 73         data _null_;
 74            date = '03feb2020'd;
 75            firstday = intnx('week.2',date,-1);
 76            lastday  = intnx('week.6',date ,-1);
 77            put (date firstday lastday) (= date9.) ;
 78         
 79         run;
 
 date=03FEB2020 firstday=27JAN2020 lastday=24JAN2020&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 29 Feb 2020 11:51:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/first-date-monday-and-last-day-friday/m-p/628409#M185682</guid>
      <dc:creator>mansour_ib_sas</dc:creator>
      <dc:date>2020-02-29T11:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: first date monday and last day friday</title>
      <link>https://communities.sas.com/t5/SAS-Programming/first-date-monday-and-last-day-friday/m-p/628410#M185683</link>
      <description>&lt;P&gt;You haven't described the desired output.&lt;/P&gt;</description>
      <pubDate>Sat, 29 Feb 2020 11:56:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/first-date-monday-and-last-day-friday/m-p/628410#M185683</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-02-29T11:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: first date monday and last day friday</title>
      <link>https://communities.sas.com/t5/SAS-Programming/first-date-monday-and-last-day-friday/m-p/628413#M185684</link>
      <description>&lt;P&gt;As Paige said, post the output you want .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   date = '03feb2020'd;
   firstday = intnx('week.2',date,-1);
   lastday  = intnx('week.6',date ,0);
   put (date firstday lastday) (= date9.) ;
   
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 29 Feb 2020 12:20:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/first-date-monday-and-last-day-friday/m-p/628413#M185684</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-02-29T12:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: first date monday and last day friday</title>
      <link>https://communities.sas.com/t5/SAS-Programming/first-date-monday-and-last-day-friday/m-p/628472#M185718</link>
      <description>I think -1 is the issue. That moves it to the previous week, but if you want it within the same week that should be 0.</description>
      <pubDate>Sat, 29 Feb 2020 19:35:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/first-date-monday-and-last-day-friday/m-p/628472#M185718</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-02-29T19:35:31Z</dc:date>
    </item>
  </channel>
</rss>

