<?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 Count the number of weekends between two date columns in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161195#M299715</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no function to calculate the number of weekends.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to make four decisions first.&amp;nbsp; What if the start date is on a Saturday or Sunday?&amp;nbsp; What if the end date is on a Saturday or Sunday?&amp;nbsp; Does the weekend that includes the start date or end date get counted?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 30 Mar 2014 02:22:49 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2014-03-30T02:22:49Z</dc:date>
    <item>
      <title>How To Count the number of weekends between two date columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161192#M299712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How To Count the number of weekends between two date columns. Is there a weekend function just like weekday function. Please advise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Mar 2014 02:38:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161192#M299712</guid>
      <dc:creator>sharath_rk</dc:creator>
      <dc:date>2014-03-29T02:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: How To Count the number of weekends between two date columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161193#M299713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a method of counting the number of weekdays between 2 dates:&lt;/P&gt;&lt;P&gt;&lt;A href="http://blogs.sas.com/content/sasdummy/2011/05/09/calculating-the-number-of-working-days-between-two-dates/" title="http://blogs.sas.com/content/sasdummy/2011/05/09/calculating-the-number-of-working-days-between-two-dates/"&gt; Calculating the number of working days between two dates - The SAS Dummy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Use this method to find the number of weekend days by subtraction from the total number of days (end - start +1), divide by 2, and round up (use the ceil function)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Mar 2014 03:07:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161193#M299713</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-03-29T03:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: How To Count the number of weekends between two date columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161194#M299714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will have to add one to the answer if weekday(start) = 1 (Sunday) and weekday(end) = 7 (Saturday), assuming end dates are counted if they are weekend days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Mar 2014 03:11:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161194#M299714</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-03-29T03:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: How To Count the number of weekends between two date columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161195#M299715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no function to calculate the number of weekends.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to make four decisions first.&amp;nbsp; What if the start date is on a Saturday or Sunday?&amp;nbsp; What if the end date is on a Saturday or Sunday?&amp;nbsp; Does the weekend that includes the start date or end date get counted?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Mar 2014 02:22:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161195#M299715</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-03-30T02:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: How To Count the number of weekends between two date columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161196#M299716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i need the count of weekends between order date column &amp;amp; delivery date column. irrespective of the start &amp;amp; end days i just need the count. For example the date range between order date column &amp;amp; delivery date column is from 15th march till 23 march the result should be 4. 15/16 &amp;amp; 22/23 are weekends. Please advise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Mar 2014 03:05:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161196#M299716</guid>
      <dc:creator>sharath_rk</dc:creator>
      <dc:date>2014-03-30T03:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: How To Count the number of weekends between two date columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161197#M299717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Richard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you please be specific as to how can i get the count per below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need the count of weekends between order date column &amp;amp; delivery date column. irrespective of the start &amp;amp; end days i just need the count. For example the date range between order date column &amp;amp; delivery date column is from 15th march till 23 march the result should be 4. 15/16 &amp;amp; 22/23 are weekends. Please advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function has to check the entire order date column &amp;amp; delivery date columns to give the count of weekends.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Mar 2014 03:12:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161197#M299717</guid>
      <dc:creator>sharath_rk</dc:creator>
      <dc:date>2014-03-30T03:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: How To Count the number of weekends between two date columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161198#M299718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The start of week will be Saturday &amp;amp; end will be Friday. Please advise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Mar 2014 04:10:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161198#M299718</guid>
      <dc:creator>sharath_rk</dc:creator>
      <dc:date>2014-03-30T04:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: How To Count the number of weekends between two date columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161199#M299719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi check this, is this what you want:&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input dateid orderdate :mmddyy. deliverydate :mmddyy.;&lt;/P&gt;&lt;P&gt;format orderdate deliverydate yymmdd.;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1 1/5/2014 2/10/2014&lt;/P&gt;&lt;P&gt;2 1/7/2014 3/8/2014&lt;/P&gt;&lt;P&gt;3 2/3/2014 4/4/2014&lt;/P&gt;&lt;P&gt;4 2/10/2014 2/15/2014&lt;/P&gt;&lt;P&gt;5 2/10/2014 3/10/2014&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;6 3/15/2014 3/23/2014&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;data want(drop=i);&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;CountOfWeekend=0;&lt;/P&gt;&lt;P&gt;do i=orderdate to deliverydate;&lt;/P&gt;&lt;P&gt;if weekday(i) in (1) then CountOfWeekend+2;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;by dateid;&lt;/P&gt;&lt;P&gt;if last.dateid then output;&lt;/P&gt;&lt;P&gt;put (orderdate deliverydate CountOfWeekend)(=);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;output:&lt;/P&gt;&lt;P&gt;-------------&lt;/P&gt;&lt;P&gt;orderdate=14-01-05 deliverydate=14-02-10 CountOfWeekend=12&lt;/P&gt;&lt;P&gt;orderdate=14-01-07 deliverydate=14-03-08 CountOfWeekend=16&lt;/P&gt;&lt;P&gt;orderdate=14-02-03 deliverydate=14-04-04 CountOfWeekend=16&lt;/P&gt;&lt;P&gt;orderdate=14-02-10 deliverydate=14-02-15 CountOfWeekend=0&lt;/P&gt;&lt;P&gt;orderdate=14-02-10 deliverydate=14-03-10 CountOfWeekend=8&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;orderdate=14-03-15 deliverydate=14-03-23 CountOfWeekend=4&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Mar 2014 08:51:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161199#M299719</guid>
      <dc:creator>pradeepalankar</dc:creator>
      <dc:date>2014-03-30T08:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: How To Count the number of weekends between two date columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161200#M299720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, that clarifies it.&amp;nbsp; Any weekend day should be counted.&amp;nbsp; Here's an easy way, not necessarily the fastest way if you have long time periods:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;weekend_days=0;&lt;/P&gt;&lt;P&gt;do _n_=order_date to delivery_date;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if weekday(_n_) in (1, 7) then weekend_days + 1;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm assuming here that if the order date is Sunday and the delivery date is the following Thursday then you want a count of 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Mar 2014 15:02:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161200#M299720</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-03-30T15:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: How To Count the number of weekends between two date columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161201#M299721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you. I tried the code and got the below error. Please advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ERROR: Invalid DO loop control information, either the INITIAL or TO expression is missing or the BY expression is missing, zero, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or invalid.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;weekend_days=0;&lt;/P&gt;&lt;P&gt;do _n_=ORD_ENTRY_DATE to DLVR_STRT_DATE;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if weekday(_n_) in (1, 7) then weekend_days + 1;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;OE_TO_SHIP_BIZ_DAYS = OE_TO_SHIP_DAYS - weekend_days;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 04:31:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161201#M299721</guid>
      <dc:creator>sharath_rk</dc:creator>
      <dc:date>2014-03-31T04:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: How To Count the number of weekends between two date columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161202#M299722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Pradeep. It gives the count of weekends however i have two date columns and in the third column for each row i need the count of weekends to be calculated.I need the weekend day reduced in the third column when compared with order date &amp;amp; delivery date. i am not sure whether adding datalines would help as i need the calc to happen as per the dates in the order date &amp;amp; delivery date columns. Please advise. if i can get the count of weekend for each row between two date columns i will be good to go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example : row 1 --- order date --- 15th mar -- delivery date 17 th mar --- output would be 1 ( 15th, 16th &amp;amp; 17th would be 3 - 15th/16th are weekends &amp;amp; hence 1 )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row 2 --- order date ---- 16th mar-- delivery date 18th march --- output would be 2 ( 16th, 17th &amp;amp; 18th would be 3 and 16th is a weekend )&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 04:38:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161202#M299722</guid>
      <dc:creator>sharath_rk</dc:creator>
      <dc:date>2014-03-31T04:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: How To Count the number of weekends between two date columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161203#M299723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;In above comment you said "Thank you Pradeep. It gives the count of weekends" and then again " if i can get the count of weekend for each row between two date columns i will be good to go."&lt;/P&gt;&lt;P&gt;so isn't it what you are getting from code??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i am confused here .... can you draw eaxmple input and output data sets with columns you need?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 09:51:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161203#M299723</guid>
      <dc:creator>pradeepalankar</dc:creator>
      <dc:date>2014-03-31T09:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: How To Count the number of weekends between two date columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161204#M299724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That message means that the program is correct but some of the data is bad.&amp;nbsp; More specifically, some values for either ORD_ENTRY_DATE or DLVR_STRT_DATE are missing.&amp;nbsp; In that case, the number of weekend days can't really be calculated.&amp;nbsp; So this fix will bypass the missing values, although it won't fix the data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (ORD_ENTRY_DATE &amp;gt; .) and (DLVR_STRT_DATE &amp;gt; .) then&lt;/P&gt;&lt;P&gt;do _n_ = ORD_ENTRY_DATE to DLVR_STRT_DATE;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 13:08:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161204#M299724</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-03-31T13:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: How To Count the number of weekends between two date columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161205#M299725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day &lt;STRONG&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" data-avatarid="-1" data-externalid="" data-presence="null" data-userid="826506" data-username="sharath_rk" href="https://communities.sas.com/people/sharath_rk" id="jive-82650611713561090585711"&gt;sharath_rk&lt;/A&gt;,&lt;/STRONG&gt;&lt;BR /&gt;Use the following code to get the number of weekends btween two dates (assuming weekend days are Sunday and Saturday) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data result (drop=i day_diff);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; day_diff = deliverydate - orderdate + 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; weekends = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do i = 1 to day_diff;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if weekday(intnx('day',orderdate,i-1)) in (1,7) then weekends = weekends + 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2014 08:30:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161205#M299725</guid>
      <dc:creator>Trancho</dc:creator>
      <dc:date>2014-04-01T08:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: How To Count the number of weekends between two date columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161206#M299726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good Day,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you. I used the code and got the below error. Please advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;File WORK.HAVE.DATA does not exist.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2014 09:57:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161206#M299726</guid>
      <dc:creator>sharath_rk</dc:creator>
      <dc:date>2014-04-01T09:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: How To Count the number of weekends between two date columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161207#M299727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Pradeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see sample data below. i need the current total days column to give me the total business days between order dare &amp;amp; delivery date as per desired output. Please advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;order date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delivery date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; current total days&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; desired output ( total days )&lt;/P&gt;&lt;P&gt;22MAR2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24MAR2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 ( exclude 22 &amp;amp; 23 which are weekends )&lt;/P&gt;&lt;P&gt;23MAR2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25MAR2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 exclude 23 weekend&lt;/P&gt;&lt;P&gt;21MAR2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24MAR2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 exclude 22/23 weekend&lt;/P&gt;&lt;P&gt;20MAR2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25MAR2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4 exclude 22/23 weekend&lt;/P&gt;&lt;P&gt;23MAR2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 26AR2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3exclude 23 weekend&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2014 11:00:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161207#M299727</guid>
      <dc:creator>sharath_rk</dc:creator>
      <dc:date>2014-04-01T11:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: How To Count the number of weekends between two date columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161208#M299728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi It would have been lot more simpler if you had provided this in begining, while you created the post, we were counting no of weekend days and your requirement if no of days without weekends:&lt;/P&gt;&lt;P&gt;you might have done this with little changes to the code provided earlier:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: Consolas;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; dateid orderdate &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: teal; font-size: 10pt;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; deliverydate :&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: teal; font-size: 10pt;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;format&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; orderdate deliverydate &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: teal; font-size: 10pt;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;datalines&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;1 22MAR2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24MAR2014&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;2 23MAR2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25MAR2014&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;3 21MAR2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24MAR2014&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;4 20MAR2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25MAR2014&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;5 23MAR2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 26MAR2014&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: Consolas;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; want(drop=i);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;DesiredOutputTotalDays=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;CurrentTotalDays=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; i=orderdate &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;to&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; deliverydate;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; weekday(i) not in (&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;7&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; DesiredOutputTotalDays+&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;CurrentTotalDays+&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; dateid;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; last.dateid &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; (orderdate deliverydate CurrentTotalDays DesiredOutputTotalDays)(=);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: Consolas;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;orderdate=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;22&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;MAR2014 deliverydate=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;24&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;MAR2014 CurrentTotalDays=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;3&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; DesiredOutputTotalDays=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;orderdate=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;23&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;MAR2014 deliverydate=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;25&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;MAR2014 CurrentTotalDays=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;3&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; DesiredOutputTotalDays=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;orderdate=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;21&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;MAR2014 deliverydate=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;24&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;MAR2014 CurrentTotalDays=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;4&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; DesiredOutputTotalDays=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;orderdate=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;20&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;MAR2014 deliverydate=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;25&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;MAR2014 CurrentTotalDays=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;6&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; DesiredOutputTotalDays=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;orderdate=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;23&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;MAR2014 deliverydate=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;26&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;MAR2014 CurrentTotalDays=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;4&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; DesiredOutputTotalDays=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;3&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2014 11:31:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161208#M299728</guid>
      <dc:creator>pradeepalankar</dc:creator>
      <dc:date>2014-04-01T11:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: How To Count the number of weekends between two date columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161209#M299729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this link also serve the same purpose&lt;/P&gt;&lt;P&gt;&lt;A href="http://blogs.sas.com/content/sasdummy/2011/05/09/calculating-the-number-of-working-days-between-two-dates/"&gt;http://blogs.sas.com/content/sasdummy/2011/05/09/calculating-the-number-of-working-days-between-two-dates/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;just few modification were needed to get your desired output.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2014 11:36:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161209#M299729</guid>
      <dc:creator>pradeepalankar</dc:creator>
      <dc:date>2014-04-01T11:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: How To Count the number of weekends between two date columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161210#M299730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Pradeep. I need the count of weekends for another calculation and in your code provided above is there a way to not enter datalines as i have 300,000 rows with diff dates between two columns and the third column should just give the total business days. Instead of datalines can i reference the data set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2014 11:37:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161210#M299730</guid>
      <dc:creator>sharath_rk</dc:creator>
      <dc:date>2014-04-01T11:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: How To Count the number of weekends between two date columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161211#M299731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;there are actually two data steps used in the code, in second datastep you can set your dataset, ignore the previous data set with datalines.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2014 12:12:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-To-Count-the-number-of-weekends-between-two-date-columns/m-p/161211#M299731</guid>
      <dc:creator>pradeepalankar</dc:creator>
      <dc:date>2014-04-01T12:12:51Z</dc:date>
    </item>
  </channel>
</rss>

