John

I've amended the CF as follows for v8:

DatesInRange ( startDate ; endDate ; weekDay ; interval ) =

Let ([
        s = GetAsDate ( startDate ) ;
        sDow = DayOfWeek ( s ) ;
        firstDate = s + weekDay - sDow + If ( sDow > weekDay ; 7 ) ;
        secondDate = firstDate + 7 * interval
      ] ;
     Case (
                 firstDate > GetAsDate ( endDate ) ; "" ;
                 secondDate >= GetAsDate ( enddate ) ; firstDate ;
firstDate & ΒΆ & DatesInRange ( firstDate + 7 * interval ; endDate ; weekDay ; interval )
                )

      )

I've tested in v8 and get multiple dates (where appropriate)

cheers

Tom

On 1 Mar 2009, at 17:15, John Wenmeekers wrote:

Woops, sorry Tom, I was jumping too early.

I only get 1 date as result.

I test this in FM 8.5A before I implement it in FM8.

Reply via email to