9 Replies Latest reply on Dec 28, 2018 3:06 AM by sajad.bhat

    Select any block of weekdays throughout the year

    jishuen.kam.1

      Suppose that I have a date parameter named Start Date and another date parameter named End Date. If I set Start Date to '2018-12-21' and set End Date to '2018-12-24', I want the filter to retain not just 2018-12-21 to 2018-12-24 (i.e. Friday to Monday), but also all the Friday-Monday blocks that happen before. The specific outcome of the filter is as follows

       

      Day of YmdWeekday of YmdTrue/ False
      12/14/2018FridayTRUE
      12/15/2018SaturdayTRUE
      12/16/2018SundayTRUE
      12/17/2018MondayTRUE
      12/18/2018TuesdayFALSE
      12/19/2018WednesdayFALSE
      12/20/2018ThursdayFALSE
      12/21/2018FridayTRUE
      12/22/2018SaturdayTRUE
      12/23/2018SundayTRUE
      12/24/2018MondayTRUE
      12/25/2018TuesdayFALSE
      12/26/2018WednesdayFALSE
      12/27/2018ThursdayFALSE

       

      If  I change the End Date to 2018-12-25, then the following outcome will result:

       

      Day of YmdWeekday of YmdTrue/ False
      12/14/2018FridayTRUE
      12/15/2018SaturdayTRUE
      12/16/2018SundayTRUE
      12/17/2018MondayTRUE
      12/18/2018TuesdayTRUE
      12/19/2018WednesdayFALSE
      12/20/2018ThursdayFALSE
      12/21/2018FridayTRUE
      12/22/2018SaturdayTRUE
      12/23/2018SundayTRUE
      12/24/2018MondayTRUE
      12/25/2018TuesdayTRUE
      12/26/2018WednesdayFALSE
      12/27/2018ThursdayFALSE

       

      Is there a way to achieve this? Brute force method is also welcome.