<?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>Question Re: Working Hours in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/working-hours/qaa-p/5659543#M2098952</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jyothi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried your formula but it gives me "The keyword then is missing" error here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; IF TIME(StDate)  SLA_Close   THEN&lt;/P&gt;&lt;P&gt;    endDate := DATETIMEVALUE(DATE(endDate) , SLA_Close);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm asuming its because of a missing &amp;gt; or &amp;lt; or =  before SLA_Close but unsure as to what?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also on the last line there is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Hours:=(DATEDIFF('N', stDATE, endDate)- NonWorkTime - WeekendTime)/60 ;&lt;/P&gt;&lt;P&gt;Hour;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should it be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Hours:=(DATEDIFF('N', stDATE, endDate)- NonWorkTime - WeekendTime)/60 ;&lt;/P&gt;&lt;P&gt;Hour&lt;STRONG&gt;s&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks for your help!&lt;/P&gt;&lt;P&gt;Dave.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Jun 2009 07:38:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-12T07:38:32Z</dc:date>
    <item>
      <title>Working Hours</title>
      <link>https://community.sap.com/t5/technology-q-a/working-hours/qaq-p/5659541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All, &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;I've been using this formula to monitor the amount of hours between two dates that have elapsed excluding weekends:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;DateDiff ("s", {campaign.date_approved}, {campaign.date_closed}) - &lt;/P&gt;&lt;P&gt;    (DateDiff ("ww", {campaign.date_approved}, {campaign.date_closed}, crSaturday)&lt;STRONG&gt;24&lt;/STRONG&gt;60*60) -&lt;/P&gt;&lt;P&gt;     (DateDiff ("ww", {campaign.date_approved}, {campaign.date_closed}, crSunday)&lt;STRONG&gt;24&lt;/STRONG&gt;60*60)&lt;/P&gt;&lt;P&gt;) /60/60;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;But i've now been told that the hour calculations should only apply to working hours 9 to 5. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Does any one know how i would do this?  I was thinking of something like subtracting 80 from the total (16 none workable hrs per day * 5 days) but not sure if this is correct?&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Any ideas any1?&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;Dave.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2009 19:53:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/working-hours/qaq-p/5659541</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-11T19:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Working Hours</title>
      <link>https://community.sap.com/t5/technology-q-a/working-hours/qaa-p/5659542#M2098951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this business hours formula and let me know how it goes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATETIMEVAR StDate:= start date;&lt;/P&gt;&lt;P&gt;DATETIMEVAR EndDate:= end date;&lt;/P&gt;&lt;P&gt;NUMBERVAR Weeks;&lt;/P&gt;&lt;P&gt;NUMBERVAR Days;&lt;/P&gt;&lt;P&gt;NUMBERVAR Hours;  &lt;/P&gt;&lt;P&gt;TIMEVAR SLA_Open := TIME(9,0,0);&lt;/P&gt;&lt;P&gt;TIMEVAR SLA_Close := TIME(17,0,0); &lt;/P&gt;&lt;P&gt;NumberVar WeekendTime ;&lt;/P&gt;&lt;P&gt;NUMBERVAR NonWorkTime ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF WeekDayName(DAYOFWEEK(StDate)) = "Saturday"  THEN &lt;/P&gt;&lt;P&gt;   StDate:= DATETIMEVALUE(DATE(DATEADD('D',2,StDate)) , SLA_Open);&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; IF WeekDayName(DAYOFWEEK(StDate)) = "Sunday"  THEN &lt;/P&gt;&lt;P&gt;   StDate:= DATETIMEVALUE(DATE(DATEADD('D',1,StDate)) , SLA_Open);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; IF TIME(StDate) &amp;gt; SLA_Close   THEN&lt;/P&gt;&lt;P&gt;    StDate := DATETIMEVALUE(DATE(StDate) , SLA_Close);&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt; IF TIME(StDate) &amp;lt;  SLA_Open THEN&lt;/P&gt;&lt;P&gt;    StDate := DATETIMEVALUE(DATE(StDate) , SLA_Open);  &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt; IF WeekDayName(DAYOFWEEK(endDate)) = "Saturday"  THEN &lt;/P&gt;&lt;P&gt;  endDate = DATETIMEVALUE(DATE(DATEADD('D',2,endDate)) , SLA_Open); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; IF WeekDayName(DAYOFWEEK(endDate)) = "Sunday"  THEN &lt;/P&gt;&lt;P&gt;  endDate = DATETIMEVALUE(DATE(DATEADD('D',1,endDate)) , SLA_Open); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF TIME(endDate) &amp;gt; SLA_Close   THEN&lt;/P&gt;&lt;P&gt;    endDate := DATETIMEVALUE(DATE(endDate) , SLA_Close);&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt; IF TIME(endDate) &amp;lt;  SLA_Open THEN&lt;/P&gt;&lt;P&gt;    endDate := DATETIMEVALUE(DATE(endDate) , SLA_Open);  &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Weeks:= (Truncate (EndDate - dayofWeek(EndDate) + 1 - (StDate - dayofWeek(StDate) + 1)) /7 ) * 5;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Days := DayOfWeek(EndDate) - DayOfWeek(StDate)  + (if DayOfWeek(StDate) = 1 then -1 else 0)  + &lt;/P&gt;&lt;P&gt;                                                   (if DayOfWeek(EndDate) = 7 then -1 else 0);   &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;// Non Worktime on Business days &lt;/P&gt;&lt;P&gt; NonWorkTime := DATEDIFF("N",DATETIMEVALUE(DATE('01-01-2001'), SLA_Close),DATETIMEVALUE(DATE('01-02-2001'),SLA_Open)) * (Weeks + Days);&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; //a weekend in minutes is Count of saturdays and sundays   * 24 hours * 60 minutes  &lt;/P&gt;&lt;P&gt; WeekendTime := (DateDiff("ww",stDate,Enddate, crSaturday ) +DateDiff("ww",stDate,Enddate, crSunday)) * 24 * 60;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Hours:=(DATEDIFF('N', stDATE, endDate)- NonWorkTime - WeekendTime)/60 ;&lt;/P&gt;&lt;P&gt;Hour&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;jyothi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2009 00:50:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/working-hours/qaa-p/5659542#M2098951</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-12T00:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Working Hours</title>
      <link>https://community.sap.com/t5/technology-q-a/working-hours/qaa-p/5659543#M2098952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jyothi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried your formula but it gives me "The keyword then is missing" error here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; IF TIME(StDate)  SLA_Close   THEN&lt;/P&gt;&lt;P&gt;    endDate := DATETIMEVALUE(DATE(endDate) , SLA_Close);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm asuming its because of a missing &amp;gt; or &amp;lt; or =  before SLA_Close but unsure as to what?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also on the last line there is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Hours:=(DATEDIFF('N', stDATE, endDate)- NonWorkTime - WeekendTime)/60 ;&lt;/P&gt;&lt;P&gt;Hour;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should it be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Hours:=(DATEDIFF('N', stDATE, endDate)- NonWorkTime - WeekendTime)/60 ;&lt;/P&gt;&lt;P&gt;Hour&lt;STRONG&gt;s&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks for your help!&lt;/P&gt;&lt;P&gt;Dave.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2009 07:38:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/working-hours/qaa-p/5659543#M2098952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-12T07:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: Working Hours</title>
      <link>https://community.sap.com/t5/technology-q-a/working-hours/qaa-p/5659544#M2098953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good work by Jyoti, use the formula, set StDate and EndDate as your start and end dates, I would have given 50 points to Jyoti if I could.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATETIMEVAR StDate:= currentdate;&lt;/P&gt;&lt;P&gt;DATETIMEVAR EndDate:= dateadd('D',8,currentdate);&lt;/P&gt;&lt;P&gt;NUMBERVAR Weeks;&lt;/P&gt;&lt;P&gt;NUMBERVAR Days;&lt;/P&gt;&lt;P&gt;NUMBERVAR Hours; &lt;/P&gt;&lt;P&gt;TIMEVAR SLA_Open := TIME(9,0,0);&lt;/P&gt;&lt;P&gt;TIMEVAR SLA_Close := TIME(17,0,0); &lt;/P&gt;&lt;P&gt;NumberVar WeekendTime ;&lt;/P&gt;&lt;P&gt;NUMBERVAR NonWorkTime ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF WeekDayName(DAYOFWEEK(StDate)) = "Saturday" THEN &lt;/P&gt;&lt;P&gt;StDate:= DATETIMEVALUE(DATE(DATEADD('D',2,StDate)) , SLA_Open);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF WeekDayName(DAYOFWEEK(StDate)) = "Sunday" THEN &lt;/P&gt;&lt;P&gt;StDate:= DATETIMEVALUE(DATE(DATEADD('D',1,StDate)) , SLA_Open);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF TIME(StDate) &amp;gt; SLA_Close THEN&lt;/P&gt;&lt;P&gt;StDate := DATETIMEVALUE(DATE(StDate) , SLA_Close);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF TIME(StDate) &amp;lt; SLA_Open THEN&lt;/P&gt;&lt;P&gt;StDate := DATETIMEVALUE(DATE(StDate) , SLA_Open); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF WeekDayName(DAYOFWEEK(endDate)) = "Saturday" THEN &lt;/P&gt;&lt;P&gt;endDate = DATETIMEVALUE(DATE(DATEADD('D',2,endDate)) , SLA_Open); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF WeekDayName(DAYOFWEEK(endDate)) = "Sunday" THEN &lt;/P&gt;&lt;P&gt;endDate = DATETIMEVALUE(DATE(DATEADD('D',1,endDate)) , SLA_Open); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF TIME(endDate) &amp;gt; SLA_Close THEN&lt;/P&gt;&lt;P&gt;endDate := DATETIMEVALUE(DATE(endDate) , SLA_Close);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF TIME(endDate) &amp;lt; SLA_Open THEN&lt;/P&gt;&lt;P&gt;endDate := DATETIMEVALUE(DATE(endDate) , SLA_Open); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Weeks:= (Truncate (EndDate - dayofWeek(EndDate) + 1 - (StDate - dayofWeek(StDate) + 1)) /7 ) * 5;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Days := DayOfWeek(EndDate) - DayOfWeek(StDate) + (if DayOfWeek(StDate) = 1 then -1 else 0) + &lt;/P&gt;&lt;P&gt;(if DayOfWeek(EndDate) = 7 then -1 else 0); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Non Worktime on Business days &lt;/P&gt;&lt;P&gt;NonWorkTime := DATEDIFF("N",DATETIMEVALUE(DATE('01-01-2001'), SLA_Close),DATETIMEVALUE(DATE('01-02-2001'),SLA_Open)) * (Weeks + Days);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//a weekend in minutes is Count of saturdays and sundays * 24 hours * 60 minutes &lt;/P&gt;&lt;P&gt;WeekendTime := (DateDiff("ww",stDate,Enddate, crSaturday ) +DateDiff("ww",stDate,Enddate, crSunday)) * 24 * 60;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hours:=(DATEDIFF('N', stDATE, endDate)- NonWorkTime - WeekendTime)/60 ;&lt;/P&gt;&lt;P&gt;Hours&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;-Azhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Jun 2009 06:30:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/working-hours/qaa-p/5659544#M2098953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-14T06:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Working Hours</title>
      <link>https://community.sap.com/t5/technology-q-a/working-hours/qaa-p/5659545#M2098954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Guys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will give this a try and report back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;Dave.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 12:27:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/working-hours/qaa-p/5659545#M2098954</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-16T12:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Working Hours</title>
      <link>https://community.sap.com/t5/technology-q-a/working-hours/qaa-p/5659546#M2098955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've set:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATETIMEVAR StDate:= currentdate;&lt;/P&gt;&lt;P&gt;DATETIMEVAR EndDate:= dateadd('D',8,currentdate);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATETIMEVAR StDate:= {campaign.date_approved};&lt;/P&gt;&lt;P&gt;DATETIMEVAR EndDate:= {campaign.date_closed}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this returns 0 results?  Have i missed something else?  Sorry to be a pain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dave.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 09:11:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/working-hours/qaa-p/5659546#M2098955</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T09:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: Working Hours</title>
      <link>https://community.sap.com/t5/technology-q-a/working-hours/qaa-p/5659547#M2098956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry it's actualy returning values like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-709.52&lt;/P&gt;&lt;P&gt;-2,134.17&lt;/P&gt;&lt;P&gt;-1,616.90&lt;/P&gt;&lt;P&gt;-1,616.94&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any Ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Again,&lt;/P&gt;&lt;P&gt;Dave.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 09:22:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/working-hours/qaa-p/5659547#M2098956</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T09:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Working Hours</title>
      <link>https://community.sap.com/t5/technology-q-a/working-hours/qaa-p/5659548#M2098957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Think i've spotted it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Non Worktime on Business days &lt;/P&gt;&lt;P&gt;NonWorkTime := DATEDIFF("N",DATETIMEVALUE(DATE('01-01-2001'), SLA_Close),DATETIMEVALUE(DATE(&lt;STRONG&gt;'01-02-2001'&lt;/STRONG&gt;),SLA_Open)) * (Weeks + Days);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Changed to UK Date Format:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Non Worktime on Business days &lt;/P&gt;&lt;P&gt;NonWorkTime := DATEDIFF("N",DATETIMEVALUE(DATE('01-01-2001'), SLA_Close),DATETIMEVALUE(DATE(&lt;STRONG&gt;'02-01-2001'&lt;/STRONG&gt;),SLA_Open)) * (Weeks + Days);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically changed mm-dd-yy to dd-mm-yy  and i'm now getting the right results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks to all that helped.  Points on the way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Dave.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 09:31:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/working-hours/qaa-p/5659548#M2098957</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T09:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Working Hours</title>
      <link>https://community.sap.com/t5/technology-q-a/working-hours/qaa-p/5659549#M2098958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was glad to find this formula and I know it's been a few years since it was posted, but this formula does not correctly calculate elapsed time hours if the "start date/time" occur on a Friday after NonWorkTime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rather it just counts all the Friday time up until midnight (for example it will count the time on Fridays between 17:00 and 23:59).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to work through how to code around this problem now and will report back if I figure out a solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2014 16:31:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/working-hours/qaa-p/5659549#M2098958</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-02-12T16:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Working Hours</title>
      <link>https://community.sap.com/t5/technology-q-a/working-hours/qaa-p/5659550#M2098959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Someone more expert than I could have probably solved this within one step, but here's how I solved the Friday after hours issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a new Formula called "Friday Remainder":&lt;/P&gt;&lt;P&gt;IF TIME({table.field for Open Date}) &amp;lt; Time (17,0,0) AND&lt;/P&gt;&lt;P&gt;(DAYOFWEEK({table.field for Open Date})) = 6 AND&lt;/P&gt;&lt;P&gt;DAYOFWEEK({table.field for Close Date})&amp;lt;&amp;gt;DAYOFWEEK({table.field for Open Date}) THEN&lt;/P&gt;&lt;P&gt;((TIME(17,0,0) - TIME({table.field for Open Date}))/60)/60&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This correctly was telling me how many hours before 17:00:00 had elapsed on Friday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then added the result of this formula to the result of the previous Elapsed Time formula to get the total true Elapsed Time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I spent some time trying to work into into the original formula that was posted here by others long ago, but couldn't get it to work quite right, so I settled for adding two formulas together.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2014 18:53:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/working-hours/qaa-p/5659550#M2098959</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-02-12T18:53:18Z</dc:date>
    </item>
  </channel>
</rss>

