Skip to main content
deleted 54 characters in body
Source Link
Sri
  • 21
  • 4
 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)
 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),00)
 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)) + 
    FLOOR((MONTH(Return_To_Work__c))/8)), 2) + MOD(2, 
  (MONTH(Return_To_Work__c))) + 2 * 
   FLOOR(1/(MONTH(Return_To_Work__c))))),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),0)
Source Link
Sri
  • 21
  • 4

 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),00)