<?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: Calculate hours based off business days in a month in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Calculate-hours-based-off-business-days-in-a-month/m-p/377770#M90733</link>
    <description>&lt;P&gt;Use an Array:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want (keep=prid projectid resourceid alloc);
set have;
where allocyear = year(today);
array months {*} allocjan-allocdec;
alloc = months{month(today())};
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 20 Jul 2017 13:57:44 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-07-20T13:57:44Z</dc:date>
    <item>
      <title>Calculate hours based off business days in a month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-hours-based-off-business-days-in-a-month/m-p/377763#M90732</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I am working with some data to calculate FTE hours based off business days in a given month (excluding weekends and standard US holidays).&amp;nbsp;&lt;/P&gt;&lt;P&gt;My data is layed out as follows -&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;PRID&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;ProjectID&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;ResourceID&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;AllocYear&lt;/STRON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gt;&lt;P&gt;2017&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;32&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;32&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;36.8&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;32&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;35.2&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;35.2&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;16&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I need to determine based off the current date(7/20/17) - what is the correct month variable to use(AllocJul) and what year (AllocYear) to use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;and then calculate the percentage of FTE hours based on the following&lt;/P&gt;&lt;P&gt;Business days in current month (July 2017 has 20 days) and multiply that (20 *8) 8 being the standard number of hours a full time FTE works per day and then divide that by the number in the current Alloc month column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be (20*8) = 160&amp;nbsp; and 16 for AllocJul in the example above&lt;/P&gt;&lt;P&gt;Would be 160/16 = 10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way in sas to do this?&lt;/P&gt;&lt;P&gt;Thank you in advance for your help!&lt;/P&gt;&lt;P&gt;Angie Miller&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 13:45:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-hours-based-off-business-days-in-a-month/m-p/377763#M90732</guid>
      <dc:creator>amiller9702</dc:creator>
      <dc:date>2017-07-20T13:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours based off business days in a month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-hours-based-off-business-days-in-a-month/m-p/377770#M90733</link>
      <description>&lt;P&gt;Use an Array:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want (keep=prid projectid resourceid alloc);
set have;
where allocyear = year(today);
array months {*} allocjan-allocdec;
alloc = months{month(today())};
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Jul 2017 13:57:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-hours-based-off-business-days-in-a-month/m-p/377770#M90733</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-07-20T13:57:44Z</dc:date>
    </item>
  </channel>
</rss>

