How parse to Google Calendar Recurrence Rule for Exchange ?

I am writing a migration tool which uses Gmail Api and EWS managed Api.  I ran into a problem of parsing Calendar Recurrence Rule. All I am getting from google Calendar  Api is nothing but a string of RRULE, EXRULE, RDATE and EXDATE for a recurring event. For example :

RRULE:FREQ=WEEKLY;UNTIL=20110701T170000Z

How can I parse this rules to EWS manged Api Recurring event  functions ? EWS managed Api has various sets of functions for creating Recurring events. Any help would be highly appreciated. Maybe some third party library I can use for the same ?

February 24th, 2015 4:44am

Hi SharpDragon,

can't tell you about the gmail api. I assume you know how to extract information from strings, so let's jump right into EWS MA Api:

You want to use an Interval.Pattern for this (since the alternatives are yearly intervals).

You'll probably need to set the interval to 7 for a weekly frequency.

Finally you convert the UNTIL Timestamp to a DateTime object:

DateTime.ParseExact("20110701T170000Z", "yyyyMMddTHHmmssZ", System.Globalization.CultureInfo.InvariantCulture)

Cheers,
Fred

Free Windows Admin Tool Kit Click here and download it now
February 24th, 2015 5:49am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics