<?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: SAS macro: First and last working day of previous week in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-First-and-last-working-day-of-previous-week/m-p/549510#M152490</link>
    <description>&lt;P&gt;Holidays vary from country to country, state to state, province to province, and even from business to business. Where I live and with the business I work in - banking - we ignore provincial holidays but count national ones as far as "business" days are concerned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only sure way of dealing with this is to create your own holidays dataset for your particular location and use that to derive what you want.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Apr 2019 07:59:02 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2019-04-09T07:59:02Z</dc:date>
    <item>
      <title>SAS macro: First and last working day of previous week</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-First-and-last-working-day-of-previous-week/m-p/549495#M152484</link>
      <description>&lt;P&gt;Hi Guys, I use this code to get the date of Monday and Friday from previous week -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let first_day=%sysfunc(intnx(week.2,%sysfunc(today()),-1,b),date9.);&lt;BR /&gt;%put first_day=&amp;amp;first_day ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let last_day=%sysfunc(intnx(week.6,%sysfunc(today()),0,b),date9.);&lt;BR /&gt;%put last_day=&amp;amp;last_day ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The macro is usable for most weeks, except when there's a holiday on Monday or Friday. How can I get the next working day if there's a holiday on Monday and previous working day if it is a holiday on Friday?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2019 06:18:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-macro-First-and-last-working-day-of-previous-week/m-p/549495#M152484</guid>
      <dc:creator>Sid_Chaurasiya</dc:creator>
      <dc:date>2019-04-09T06:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro: First and last working day of previous week</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-First-and-last-working-day-of-previous-week/m-p/549510#M152490</link>
      <description>&lt;P&gt;Holidays vary from country to country, state to state, province to province, and even from business to business. Where I live and with the business I work in - banking - we ignore provincial holidays but count national ones as far as "business" days are concerned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only sure way of dealing with this is to create your own holidays dataset for your particular location and use that to derive what you want.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2019 07:59:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-macro-First-and-last-working-day-of-previous-week/m-p/549510#M152490</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-04-09T07:59:02Z</dc:date>
    </item>
  </channel>
</rss>

