9 Replies Latest reply: May 24, 2014 7:21 PM by Jagan Nalla RSS

    Problem with date range(between)

      I've started a similar discussion a week ago but now it's different. Here's my table.

       

      userstartdateenddateaudience
      john01/02/201330/04/20139
      mike01/02/201320/09/20135
      mike01/09/201331/12/20136
      mike30/04/201231/12/20127
      john01/04/201331/12/201315
      mike01/01/201401/06/20141
      john30/04/201405/06/20143
      john01/06/201412/12/20144
      melissa01/01/201401/06/20144


      Note that 'John' first date ends in April 30, but the second date starts with April 1st. So, what i need to do is, consider John's first end date to be March 31, since he started a new one on April 1st.

       

      I've tried to use peek() but since this table has no order at all, and not always the previous dates are the right ones to compare with, it's not working.