<?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: how to calculate the gap of working days between two columns ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-the-gap-of-working-days-between-two-columns/m-p/303333#M64417</link>
    <description>&lt;P&gt;I did it in two steps:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) using table of non working dates - create a &lt;STRONG&gt;format&lt;/STRONG&gt; (NWD.) with&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;each&lt;/STRONG&gt; non working date translated to 0 and &lt;STRONG&gt;OTHER&lt;/STRONG&gt; translated to 1.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Do it once, for the whole period of years including some future years.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) calculate working days (WDS) from given dates: from FDT to UDT by:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WDS = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;do date = FTD to UDT;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WDS = WDS + input(put(date,NWD.),1.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;end;&lt;/P&gt;</description>
    <pubDate>Sat, 08 Oct 2016 02:16:14 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2016-10-08T02:16:14Z</dc:date>
    <item>
      <title>how to calculate the gap of working days between two columns ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-the-gap-of-working-days-between-two-columns/m-p/303257#M64383</link>
      <description>&lt;P&gt;I would like to calculate the working days interval between two columns of a working table.&lt;/P&gt;&lt;P&gt;The idea is to create a table that will use informations from two other tables as follow: one with the list of the holidays of the year and another that contains the dates that must be compared. How do I have to proceed?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2016 19:04:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-the-gap-of-working-days-between-two-columns/m-p/303257#M64383</guid>
      <dc:creator>Marcate</dc:creator>
      <dc:date>2016-10-07T19:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate the gap of working days between two columns ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-the-gap-of-working-days-between-two-columns/m-p/303333#M64417</link>
      <description>&lt;P&gt;I did it in two steps:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) using table of non working dates - create a &lt;STRONG&gt;format&lt;/STRONG&gt; (NWD.) with&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;each&lt;/STRONG&gt; non working date translated to 0 and &lt;STRONG&gt;OTHER&lt;/STRONG&gt; translated to 1.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Do it once, for the whole period of years including some future years.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) calculate working days (WDS) from given dates: from FDT to UDT by:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WDS = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;do date = FTD to UDT;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WDS = WDS + input(put(date,NWD.),1.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;end;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2016 02:16:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-the-gap-of-working-days-between-two-columns/m-p/303333#M64417</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-10-08T02:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate the gap of working days between two columns ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-the-gap-of-working-days-between-two-columns/m-p/303339#M64420</link>
      <description>&lt;P&gt;SAS offers quite a few very useful calendar functions like intnx() and intck() which allows you get such calculations done.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have your own holiday calendar then you must first create a "custom interval" though. Have a look into the Custom Intervals section under the following link:&amp;nbsp;&lt;A href="http://www.sascommunity.org/wiki/Generating_Holiday_Lists&amp;nbsp;" target="_blank"&gt;http://www.sascommunity.org/wiki/Generating_Holiday_Lists&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2016 03:41:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-calculate-the-gap-of-working-days-between-two-columns/m-p/303339#M64420</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2016-10-08T03:41:27Z</dc:date>
    </item>
  </channel>
</rss>

