<?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 Calculate and split working minutes between two dates in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-and-split-working-minutes-between-two-dates/m-p/212096#M52379</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an&lt;EM&gt;&lt;STRONG&gt; s&lt;/STRONG&gt;&lt;STRONG&gt;tart&lt;/STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt; datetime&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/EM&gt; and an &lt;EM&gt;&lt;STRONG&gt;end&lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;EM&gt;&lt;STRONG&gt;datetime&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;, lets say&amp;nbsp; 11JUN2015:03:14:02 and &lt;SPAN style="font-size: 13.3333330154419px;"&gt;16JUN2015:09:05:20 respectively. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to calculate the working &lt;SPAN style="text-decoration: underline;"&gt;minutes&lt;/SPAN&gt; between these two &lt;SPAN style="text-decoration: underline;"&gt;datetimes&lt;/SPAN&gt;, but I want the working &lt;SPAN style="text-decoration: underline;"&gt;minutes&lt;/SPAN&gt; to be split into two groups. Working &lt;SPAN style="text-decoration: underline;"&gt;minutes &lt;/SPAN&gt;is just calculated as &lt;EM&gt;&lt;STRONG&gt;(start &lt;SPAN style="text-decoration: underline;"&gt;datetime&lt;/SPAN&gt; - end&lt;SPAN style="text-decoration: underline;"&gt; datetime&lt;/SPAN&gt;)/60 &lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;The problem I'm getting is to split the working &lt;SPAN style="text-decoration: underline;"&gt;minutes &lt;/SPAN&gt;into &lt;EM&gt;&lt;STRONG&gt;weekend working &lt;SPAN style="text-decoration: underline;"&gt;minutes &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;and &lt;EM&gt;&lt;STRONG&gt;business day working &lt;SPAN style="text-decoration: underline;"&gt;minutes&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what I want to get at is two variables that display the &lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;&lt;STRONG&gt;weekend working &lt;SPAN style="text-decoration: underline;"&gt;minutes &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;and the &lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;&lt;STRONG&gt;business day working &lt;SPAN style="text-decoration: underline;"&gt;minutes &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;respectively between the two &lt;SPAN style="text-decoration: underline;"&gt;datetimes&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;input&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;&lt;STRONG&gt;start &lt;SPAN style="text-decoration: underline;"&gt;datetime&lt;/SPAN&gt;: &lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;11JUN2015:03:14:02&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;&lt;STRONG&gt;end &lt;SPAN style="text-decoration: underline;"&gt;datetime&lt;/SPAN&gt;:&lt;/STRONG&gt; &lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;16JUN2015:09:05:20&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Results&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;&lt;STRONG&gt;weekend working &lt;SPAN style="text-decoration: underline;"&gt;minutes &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #454545; font-family: Helvetica, 'Ubuntu Light', Arial, sans-serif; font-size: 15px; background-color: #f4fcf0;"&gt;2685 (Minutes)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;&lt;STRONG&gt;business day working &lt;SPAN style="text-decoration: underline;"&gt;minutes &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #454545; font-family: Helvetica, 'Ubuntu Light', Arial, sans-serif; font-size: 15px; background-color: #f4fcf0;"&gt;2685 + &lt;SPAN style="color: #454545; font-family: Helvetica, 'Ubuntu Light', Arial, sans-serif; font-size: 15px; background-color: #f4fcf0;"&gt;1985 = 4670&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #454545; font-family: Helvetica, 'Ubuntu Light', Arial, sans-serif; font-size: 15px; background-color: #f4fcf0;"&gt; (Minutes)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #454545; font-family: Helvetica, 'Ubuntu Light', Arial, sans-serif; font-size: 15px; background-color: #f4fcf0;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas ? :smileygrin:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Marnitz van den Heever.&lt;/P&gt;&lt;P&gt;Changes made are underlined.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Jun 2015 12:44:53 GMT</pubDate>
    <dc:creator>mjheever</dc:creator>
    <dc:date>2015-06-23T12:44:53Z</dc:date>
    <item>
      <title>Calculate and split working minutes between two dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-and-split-working-minutes-between-two-dates/m-p/212096#M52379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an&lt;EM&gt;&lt;STRONG&gt; s&lt;/STRONG&gt;&lt;STRONG&gt;tart&lt;/STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt; datetime&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/EM&gt; and an &lt;EM&gt;&lt;STRONG&gt;end&lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;EM&gt;&lt;STRONG&gt;datetime&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;, lets say&amp;nbsp; 11JUN2015:03:14:02 and &lt;SPAN style="font-size: 13.3333330154419px;"&gt;16JUN2015:09:05:20 respectively. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to calculate the working &lt;SPAN style="text-decoration: underline;"&gt;minutes&lt;/SPAN&gt; between these two &lt;SPAN style="text-decoration: underline;"&gt;datetimes&lt;/SPAN&gt;, but I want the working &lt;SPAN style="text-decoration: underline;"&gt;minutes&lt;/SPAN&gt; to be split into two groups. Working &lt;SPAN style="text-decoration: underline;"&gt;minutes &lt;/SPAN&gt;is just calculated as &lt;EM&gt;&lt;STRONG&gt;(start &lt;SPAN style="text-decoration: underline;"&gt;datetime&lt;/SPAN&gt; - end&lt;SPAN style="text-decoration: underline;"&gt; datetime&lt;/SPAN&gt;)/60 &lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;The problem I'm getting is to split the working &lt;SPAN style="text-decoration: underline;"&gt;minutes &lt;/SPAN&gt;into &lt;EM&gt;&lt;STRONG&gt;weekend working &lt;SPAN style="text-decoration: underline;"&gt;minutes &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;and &lt;EM&gt;&lt;STRONG&gt;business day working &lt;SPAN style="text-decoration: underline;"&gt;minutes&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what I want to get at is two variables that display the &lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;&lt;STRONG&gt;weekend working &lt;SPAN style="text-decoration: underline;"&gt;minutes &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;and the &lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;&lt;STRONG&gt;business day working &lt;SPAN style="text-decoration: underline;"&gt;minutes &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;respectively between the two &lt;SPAN style="text-decoration: underline;"&gt;datetimes&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;input&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;&lt;STRONG&gt;start &lt;SPAN style="text-decoration: underline;"&gt;datetime&lt;/SPAN&gt;: &lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;11JUN2015:03:14:02&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;&lt;STRONG&gt;end &lt;SPAN style="text-decoration: underline;"&gt;datetime&lt;/SPAN&gt;:&lt;/STRONG&gt; &lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;16JUN2015:09:05:20&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Results&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;&lt;STRONG&gt;weekend working &lt;SPAN style="text-decoration: underline;"&gt;minutes &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #454545; font-family: Helvetica, 'Ubuntu Light', Arial, sans-serif; font-size: 15px; background-color: #f4fcf0;"&gt;2685 (Minutes)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;&lt;STRONG&gt;business day working &lt;SPAN style="text-decoration: underline;"&gt;minutes &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #454545; font-family: Helvetica, 'Ubuntu Light', Arial, sans-serif; font-size: 15px; background-color: #f4fcf0;"&gt;2685 + &lt;SPAN style="color: #454545; font-family: Helvetica, 'Ubuntu Light', Arial, sans-serif; font-size: 15px; background-color: #f4fcf0;"&gt;1985 = 4670&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #454545; font-family: Helvetica, 'Ubuntu Light', Arial, sans-serif; font-size: 15px; background-color: #f4fcf0;"&gt; (Minutes)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #454545; font-family: Helvetica, 'Ubuntu Light', Arial, sans-serif; font-size: 15px; background-color: #f4fcf0;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas ? :smileygrin:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Marnitz van den Heever.&lt;/P&gt;&lt;P&gt;Changes made are underlined.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2015 12:44:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-and-split-working-minutes-between-two-dates/m-p/212096#M52379</guid>
      <dc:creator>mjheever</dc:creator>
      <dc:date>2015-06-23T12:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate and split working hours between two dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-and-split-working-minutes-between-two-dates/m-p/212097#M52380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) You have a DATETIME, not a date. Pardon my yelling but I'm getting kind of frustrated with people calling datetimes as dates.&lt;/P&gt;&lt;P&gt;First: Define business day. Are holidays working days such as New Years, Christmas, Easter, etc?&lt;/P&gt;&lt;P&gt;How are holidays treated that fall on holidays?&lt;/P&gt;&lt;P&gt;How long are the intervals likely to be for these start end pairs?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your start and end dates are SAS datetime variables then hours will not be&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;(start date-end date)/60 &lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;since SAS datetimes represent seconds the divisor would be 3600. BUT using SAS datetime variables you have functions to determine intervals as well as day of week, month, year of the variables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2015 14:45:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-and-split-working-minutes-between-two-dates/m-p/212097#M52380</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-06-23T14:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate and split working hours between two dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-and-split-working-minutes-between-two-dates/m-p/212098#M52381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for correcting me &lt;A __default_attr="260198" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; , I hope the problem is now fixed after I made changes to the original message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Business day definition: Monday,Tuesday,Wednesday, Thursday, Friday (00h00 - 23h59).&lt;/P&gt;&lt;P&gt;Weekend day definition: Saturday, Sunday (00h00-23h59).&lt;/P&gt;&lt;P&gt;No need to take holidays into account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The intervals vary from few minutes to days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My understanding was that (&lt;EM&gt;&lt;STRONG&gt;start datetime&lt;/STRONG&gt;&lt;/EM&gt; - &lt;EM&gt;&lt;STRONG&gt;end datetime&lt;/STRONG&gt;&lt;/EM&gt;)/60 = minutes, am I understanding this wrong ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes I have tried something similar to this thread:&amp;nbsp; &lt;A __default_attr="61810" __jive_macro_name="thread" class="jive_macro jive_macro_thread" href="https://communities.sas.com/" modifiedtitle="true" title="Hour-By-Hour Time Interval Indicators"&gt;&lt;/A&gt; but it then generates a massive data set which takes up a lot of processing time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for all the input Ballardw.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2015 15:35:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-and-split-working-minutes-between-two-dates/m-p/212098#M52381</guid>
      <dc:creator>mjheever</dc:creator>
      <dc:date>2015-06-23T15:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate and split working hours between two dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-and-split-working-minutes-between-two-dates/m-p/212099#M52382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The division by 60 will give minutes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is one very inefficient way but works by counting which category each second belongs to. Then divide to get seconds.&lt;/P&gt;&lt;P&gt;My example gets a different result than your example probably due to a rounding difference somewhere or possibly how you treated values near midnight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data junk;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; start = '11JUN2015:03:14:02'dt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; end&amp;nbsp;&amp;nbsp; = '16JUN2015:09:05:20'dt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; weekend=0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; business=0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; do i=start to end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if weekday(datepart(i)) in (1,7) then weekend+1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else business+1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; weekend= weekend/60;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; business= business/60;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; drop i;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2015 15:56:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-and-split-working-minutes-between-two-dates/m-p/212099#M52382</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-06-23T15:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate and split working hours between two dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-and-split-working-minutes-between-two-dates/m-p/212100#M52383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Ballardw !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your solution worked perfectly.&lt;/P&gt;&lt;P&gt;It takes a while to run on a relatively data set but if you got some processing time on your hands then the solution you provided works very well &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 10:28:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-and-split-working-minutes-between-two-dates/m-p/212100#M52383</guid>
      <dc:creator>mjheever</dc:creator>
      <dc:date>2015-06-24T10:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate and split working hours between two dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-and-split-working-minutes-between-two-dates/m-p/212101#M52384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The exercise for the interested reader is:&lt;/P&gt;&lt;P&gt;Start with the starttime, see if the next midnight (intnx function) is in the same as the current period and accumulate the time. If the end time occurs before the next midnight then accumulate the time for the current. Repeat with the comparison at the next midnight. I think this should take an addition 12-15 lines of code but I was lazy!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 13:43:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-and-split-working-minutes-between-two-dates/m-p/212101#M52384</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-06-24T13:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate and split working hours between two dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-and-split-working-minutes-between-two-dates/m-p/212102#M52385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Haha i'm definitely going to give it a try as you mentioned above Ballardw :smileygrin:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 11:30:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-and-split-working-minutes-between-two-dates/m-p/212102#M52385</guid>
      <dc:creator>mjheever</dc:creator>
      <dc:date>2015-06-25T11:30:14Z</dc:date>
    </item>
  </channel>
</rss>

