3 Replies Latest reply on Jun 25, 2019 6:32 AM by Joel Acha

    Day Difference in OBIEE 11g excluding weekends


      Hi All,


                I am trying to find out the the day difference between two dates excluding the sat and sunday but I'm not getting it working. I've tried the following code below, but it not worked well :




      TIMESTAMPADD( SQL_TSI_DAY , 1 - DAYOFWEEK("Date_1"), "Date_2"),

      TIMESTAMPADD( SQL_TSI_DAY , 8 - DAYOFWEEK("Date_2"), "Date_2")))/7*5)


              Does anyone knows how to calculate that ?


              Thanks in advance.