First to third monday every 6 months

Hi,

I need the recurrence rule to find

The first to third monday of every 6 month(I need the Mondays)

DTSTART:20040105T000000
RRULE:FREQ=MONTHLY;INTERVAL=6;BYDAY=1MO,2MO,3MO

This will select 1st, 2nd and 3rd Monday from every 6 months from the start date.

Hi,

I got your reply.I would like to get the code to create the recurrence pattern as follows:

DTSTART:20040105T000000
RRULE:FREQ=MONTHLY;INTERVAL=6;BYDAY=1MO,2MO,3MO

This will select 1st, 2nd and 3rd Monday from every 6 months from the start date.

Thanks for your prompt reply.

RecurrencePattern p = new RecurrencePattern();
p.StartDate = new DateTime(2004, 1, 5);

RecurrenceRule r = p.RRules.Add();
r.Frequency = Frequency.Monthly;
r.Interval = 6;
r.ByDay.Add(DayOfWeek.Monday, 1);
r.ByDay.Add(DayOfWeek.Monday, 2);
r.ByDay.Add(DayOfWeek.Monday,3 );

of course you can also do

RecurrencePattern p = new RecurrencePattern(“DTSTART:20040105T000000
\nRRULE:FREQ=MONTHLY;INTERVAL=6;BYDAY=1MO,2MO,3MO”);