Final OutPutOutput:
ROUND(((IF(DAY(Return_To_Work__c) <= 15, DATE(
YEAR(Return_To_Work__c) ,
MONTH(Return_To_Work__c) -1,(DAY(Return_To_Work__c)-
DAY(Return_To_Work__c)+
28 + MOD(((MONTH(Return_To_Work__c) -1) +
FLOOR((MONTH(Return_To_Work__c) -1)/8)), 2) + MOD(2,
(MONTH(Return_To_Work__c) -1)) + 2 *
FLOOR(1/(MONTH(Return_To_Work__c)
-1))))
,IF(DAY(Return_To_Work__c) >= 16,DATE( YEAR(Return_To_Work__c)
,MONTH(Return_To_Work__c),(DAY(Return_To_Work__c)-
DAY(Return_To_Work__c)+28 + MOD(((MONTH(Return_To_Work__c) -1) +
+ FLOOR((MONTH(Return_To_Work__c) -1)/8)), 2) + MOD(2,
(MONTH(Return_To_Work__c) -1)) + 2 *
FLOOR(1/(MONTH(Return_To_Work__c) -1)))),NULL)) -
IF(DAY(First_Day_Of_Leave__c) <= 15, DATE(
YEAR(First_Day_Of_Leave__c)
, MONTH(First_Day_Of_Leave__c) ,
(DAY(First_Day_Of_Leave__c)-
DAY(First_Day_Of_Leave__c)+1)),IF(DAY(First_Day_Of_Leave__c) >=
16,DATE( YEAR(First_Day_Of_Leave__c)
,MONTH(First_Day_Of_Leave__c)+1,(DAY(First_Day_Of_Leave__c)-
DAY(First_Day_Of_Leave__c)+1)),NULL)))/30),000)