1 Reply Latest reply: Mar 26, 2013 2:06 AM by jagan mohan rao appala RSS

    Find difference between two dates

    Nayankumar Patel

      Hi,

      I want to find date difference in days between two dates say D1 and D1 i.e. (D1-D2)

      But in that case Holydays and some week days should be removed and not considered.

      Networkdays function not working in this case

      For example

      1) Find the date difference between two dates in days and remove all Mondays and holydays (Saturdays must be considered must not be removed)

      2) Find the date difference between two dates in days and remove only 2nd and 4th Saturdays and holydays etc.

       

      Thanks

        • Re: Find difference between two dates
          jagan mohan rao appala

           

          Hi,

           

          Arrive a field (flag) in your script for working days by implementing all your conditions, and then use this flag in expression like

           

          =Sum({<DateField={'>=$(=vStartDate)<=$(=vEndDate)'} IsWorkingDay)

           

          In the above expression where DateField is your dimension name, and IsWorkingDay is a flag which has value 0 or 1.

           

          Hope this helps you.

           

          Regards,

          Jagan.