Changing Recurring Events programmatically

From: Ruud Stijger (R.[NoSpam)
Date: 03/17/05


Date: Thu, 17 Mar 2005 11:00:53 GMT

Hello,

I've been succesful in parsing Recurring Event definitions (out of a
EventsList). No problem in calculating its event dates, and altering its
properties. Except for one nasty little thing:

When I change the startdate (field: EventDate) and/or enddate (field:
EndDate), Sharepoint automatically changes the Duration field for me (it
will be set to the number of seconds this event definition spans). Setting
the Duration field to '0' doesn't help.
===========================
ows_EventDate='2005-03-15 00:00:00'
ows_EndDate='2024-04-30 00:00:00'
ows_Duration='603590400'
===========================
In this case, every single event belonging to this definition, will be equal
as long as the complete definition span.

Now, when I alter these fields via sharepoint's own Edit-Series form, the
Duration field will be kept at (or reset to) '0'. What it should be.
===========================
ows_EventDate='2005-03-15 00:00:00'
ows_EndDate='2024-04-30 00:00:00'
ows_Duration='0'
===========================

My question is simple: how do I, in code, change the start- and/or enddate,
without Sharepoint changing the Duration. Or how can I manualy reset the
Duration field?

Best regards,
Ruud Stijger.

Management System Development
http://msd.on-l-i-n-e.com


Loading