Welcome to MSDN Blogs Sign in | Join | Help

Understanding the SharePoint calendar and how to export it to iCal format

Introduction

One of the challenges of accessing SharePoint calendars via the object model is that there are so many different types of events – normal events, all-day events, recurring events, recurrence exceptions, and deleted instances – and they all look more or less the same!  In this post, I will shed some light on how to work with calendar events, describe the subtleties of recurrences, and put that knowledge to work exporting events to the RFC 2445 iCalendar format.

First, before we can do anything with a Calendar list, we need a way to distinguish between different event types.

Distinguishing between calendar item types

Calendar items in SharePoint fall into several categories.  Single events are those which don’t repeat and only appear once on the calendar, while recurring events may show up any number of times depending on the recurrence pattern selected by a user.  Either type of event may have a defined start and end time, or it may be an all-day event which lasts from midnight to 11:59 PM.

Furthermore, individual instances of a recurring event may be deleted or edited, creating a new event which takes its place.  The event created by a deleted instance instructs the calendar not to render that day’s instance of the recurring event.

Calendar events can be distinguished by looking at the fRecurrence, fAllDayEvent, and EventType field values:

Type

Description

fRecurrence

fAllDayEvent

EventType

Single event

An event created with the All Day Event and Recurrence checkboxes unselected.

False

False

0

All-day event

An event created with the All Day Event checkbox selected.

False

True

0

Recurring event

An event created with the Recurrence checkbox selected.  Has a recurrence icon in the All Events view.  Appears as a single master event on the All Events view, but as recurring instances on the Current Events and Calendar views.

True

False

1

Recurring all-day event

Same as above, but with the All Day Event checkbox selected at creation time.

True

True

1

Recurrence exception

Created by editing an instance of a recurring event.  Has a strikethrough recurrence icon in the All Events view.

True

False

4

All-day recurrence exception

Same as above, but created by editing an instance of an all-day recurring event.

True

True

4

Deleted instance of a recurring event

Created by deleting a instance of a recurring event.  Title is prefixed with “Deleted:” in the All Events view, and is hidden in the Current Events and Calendar views.

True

False

3

Deleted instance of an all-day recurring event

Same as above, but created by deleting an instance of an all-day recurring event.

True

True

3

Understanding recurring events

Recurring events have a number of subtleties not found in single events.  Most importantly, one recurring event item expands into any number of recurring event instances when it is rendered in the calendar view.  Recurring events also make use of fields left empty in single events.

Certain fields are interpreted differently depending on whether the item in question is a recurring event or a single event:

Field

Value for single event

Value for recurring event

EventDate

Start date and time

Start date and time set for the recurring event when it was created, which may be an earlier date than the first instance of the recurring event.

EndDate

End date and time

End date and time for the last instance of the recurring event.  For recurring events with no end date, this is a computed date several years in the future.

Duration

The time in seconds between EventDate and EndDate. 

The duration in seconds of an individual instance of the recurring event.

 

Similarly, exceptions and deleted instances have fields which relate the event back to the parent recurring event:

Field

Value for exception or deleted instance

MasterSeriesItemID

The ID of the recurring event from which this exception or deleted instance was made.

RecurrenceID

The date and time of the instance of the recurring event which this exception or deleted instance takes the place of.

 

Once you’ve determined that you’re working with a recurring event, you’ll likely want to work with individual instances of the recurrence.

Recurrence patterns and expanding events

Recurring events store the pattern used to display instances of the recurring event as XML in the RecurrenceData field.  While this data is best used in a read-only fashion, the following are examples of the patterns you may encounter:

Recurrence type

RecurrenceData field value

Daily every 1 days, no end date

<recurrence><rule>

<firstDayOfWeek>su</firstDayOfWeek>

<repeat><daily dayFrequency="1" /></repeat>

<repeatForever>FALSE</repeatForever>

</rule></recurrence>

Weekly every Monday, Tuesday, and Wednesday, end by 5/31/2007

<recurrence><rule>

<firstDayOfWeek>su</firstDayOfWeek>

<repeat><weekly mo="TRUE" tu="TRUE" we="TRUE" weekFrequency="1" /></repeat>

<windowEnd>2007-05-31T22:00:00Z</windowEnd>

</rule></recurrence>

Monthly the third Wednesday of every 2 months, no end date

<recurrence><rule>

<firstDayOfWeek>su</firstDayOfWeek>

<repeat><monthlyByDay we="TRUE" weekdayOfMonth="third" monthFrequency="2" /></repeat>

<repeatForever>FALSE</repeatForever>

</rule></recurrence>

Yearly every May 18, end after 10 instances

<recurrence><rule>

<firstDayOfWeek>su</firstDayOfWeek>

<repeat><yearly yearFrequency="1" month="5" day="18" /></repeat>

<repeatInstances>10</repeatInstances>

</rule></recurrence>

 

Thankfully, you don’t need to parse this XML yourself to get the actual instances of the recurring event.  Instead, you can use the SharePoint object model to expand recurring events during a given month:

// Get the Events list

SPSite site = new SPSite("http://localhost");

SPWeb web = site.RootWeb;

SPList calendarList = web.Lists["Calendar"];

 

// Construct a query that expands recurring events

SPQuery query = new SPQuery();

query.ExpandRecurrence = true;

query.Query = "<Where><DateRangesOverlap><FieldRef Name=\"EventDate\" /><FieldRef Name=\"EndDate\" /><FieldRef Name=\"RecurrenceID\" /><Value Type=\"DateTime\"><Month /></Value></DateRangesOverlap></Where>";

 

// Look forward from the beginning of the current month

query.CalendarDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);

 

// Returns all items (including recurrence instances) that

// would appear in the calendar view for the current month

SPListItemCollection calendarItems = calendarList.GetItems(query);

 

foreach (SPListItem item in calendarItems)

{

Console.WriteLine(item["Title"] + ": starts "

+ item["EventDate"].ToString() + " and ends "

+ item["EndDate"].ToString());

}

Note that after expansion, each instance of a recurring event has the same ID as the recurring event that produced it.  In other words, a recurring event with ID 7 will appear as many recurring event instances in the code above, each with an ID of 7.

Putting it to work

It’s always easier to learn from an example than from dry technical descriptions, and to that end I’ve developed a SharePoint Solution which uses the functionality I’ve described above.  When installed and activated, it adds an “Export Calendar to iCal Format” button to the Actions menu of every Calendar list in the site collection as pictured below.

To convert events to RFC 2445 iCalendar format, I loop through each event, translating recurrence patterns into iCalendar format and associating exceptions and deleted instances with the recurring event they came from.  The majority of the code deals with interpreting the recurrence pattern; however, there is also a significant amount of code to translate SharePoint timezone information as well.

You can download the iCalendar Exporter solution and source code, which have been released as part of the Community Kit for SharePoint, right here.  Launch Visual Studio, take a look at my source code, and have fun developing custom solutions with the SharePoint calendar! Please leave a comment if you have any questions or want to showcase an innovative solution that you've built.

 

Matt Swann
SDET, SharePoint

Published Monday, May 14, 2007 11:44 PM by LLiu

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# " + title + "

Wednesday, May 16, 2007 2:30 AM by " + title + "

# re: Understanding the SharePoint calendar and how to export it to iCal format

Matt,

Having this information a few years ago for WSSv2 would have saved me much frustration.  There is something that I am struggling with now though - WSSv3 has added recurrence patterns that use the Nth day, weekday, and weekend day of the month in addition to the normal days (Monday, Tuesday, etc.) that were there before.  When retrieving the RecurrenceData field for patterns that use these new additions, the only data in the field is <V3RecurrencePattern />.  Before I drive myself batty, could you explain how this works, and how I can get the recurrence data?  Also, is there a way to use the ExpandRecurrence property when getting list data via the web services?  If this were possible I could retire my in-house parser and use the real SharePoint logic that does this.

TIA to anyone that can help me.

Wednesday, May 16, 2007 11:40 PM by Jack Jones

# re: Understanding the SharePoint calendar and how to export it to iCal format

Jack,

Are these recurring items that were created through Outlook, or through the WSS UI?  I'll take a look first thing tomorrow morning and get back to you on this and the web services question.

(I'm pretty sure you can use the QueryOptions string as given in the code sample in the web service call, but I want to try it first.)

Thursday, May 17, 2007 12:44 AM by Matt Swann

# re: Understanding the SharePoint calendar and how to export it to iCal format

Matt,

I am creating them using the UI.  It only happens when using those three new options in the Monthly by Day or Yearly by Day pattern are used.

Thanks for your help.

Thursday, May 17, 2007 1:09 PM by Jack Jones

# re: Understanding the SharePoint calendar and how to export it to iCal format

Jack,

I did a little research and found the answer for you.  We ran into a problem during the development of WSSv3 where clients who parsed our recurrence XML would get tripped up by our new day/weekday/weekend day pattern data.  To resolve this, we hide the recurrence XML for those patterns unless the client sets a flag in the queryOptions parameter of the SOAP request.

To get the actual recurrence XML pattern, send the following as the value for the queryOptions parameter:

<QueryOptions><RecurrencePatternXMLVersion>v3</RecurrencePatternXMLVersion></QueryOptions>

As you've probably already discovered, passing <ViewFields /> to the viewFields parameter will return all the item's fields in the SOAP response.

Now, on to expanding recurrences via SOAP... I tried using the query string given in the OM example (wrapped in <Query></Query> like the web service expects) and didn't get any response.  It looks like this is because the CalendarDate property needs to be set before the query is made, but there isn't any provision for that in the web service to date.  I'll ask around, but it sounds like you'll have to parse the recurrences out by hand on the client.

Thursday, May 17, 2007 1:19 PM by Matt Swann

# re: Understanding the SharePoint calendar and how to export it to iCal format

We haven't yet installed the exporter solution, but I do have one question -- does this also allow a user to export one event to their calendar? We have folks using Entourage and iCal, and when they see an event listed on a calendar they want to be able to add it (seamlessly?) to their own calendars.

At first glance, your tool would appear to export the entire calendar to iCal, which isn't what they want to do -- they want to export only a few specific events. Any advice there? TIA!

Tuesday, May 22, 2007 4:45 PM by Monica

# re: Understanding the SharePoint calendar and how to export it to iCal format

Thanks Matt for the nice and informative article. How can we achieve the same with WSS v 2.0?

Monday, June 04, 2007 7:05 AM by Mughal

# re: Understanding the SharePoint calendar and how to export it to iCal format

Hi,

I want to get all events from a list with recurrent events expanded, like in "Current Events" view. How can i do it?

Thanks in advance.

Tuesday, June 12, 2007 6:49 AM by Sergio Calleja

# re: Understanding the SharePoint calendar and how to export it to iCal format

My question is the same as Monica's, Is there anyway you can export single events from the export menu? or will it export the entire calendar and every listing?

Thanks for your time.

Wednesday, June 13, 2007 7:26 PM by Trent Clayphan

# re: Understanding the SharePoint calendar and how to export it to iCal format

Matt,

This was a great article and addresses the export to ical aspect quite thoroughly.  I'm working with a group, though, that uses Zimbra as their email solution and is interested in parsing and viewing icals published there within SharePoint.  Any insights into this opposite side of the equation--importing iCals into SharePoint?

Thanks.

Monday, June 18, 2007 4:23 PM by Stacey Bailey

# re: Understanding the SharePoint calendar and how to export it to iCal format

i am getting the Error  on ical.aspx as:

Year, Month, and Day parameters describe an un-representable DateTime.

Wednesday, June 27, 2007 7:21 AM by andy

# re: Understanding the SharePoint calendar and how to export it to iCal format

Any information on an iCal importer?

Monday, July 02, 2007 9:24 AM by Jon

# re: Understanding the SharePoint calendar and how to export it to iCal format

Good article...but I have to say I'm baffled and disappointed that SharePoint's RSS feeds and/or web services (asmx) do not provide a sensible way to extract SharePoint's calendars with EXPANDED recurring events.

What I've been trying to do is simple:

- I'd like to pull data out of a SharePoint calendar (currently within an intranet) and use that data to publish a calendar of events in our extranet (not a SharePoint site).

- I have some limitations -- i.e. I can't make the SharePoint pages available to anonymous visitors (yet) and cannot install my own asmx files within the SharePoint site (yet) therefore the query.ExpandedRecurrence property isn't available in my situation.  Such changes to our SharePoint site have to be approved by a series of administrators and what I'm attempting to do shouldn't be terribly difficult...but it is!

- Hence, bound to these limitations I have only a few options to extract calendar data from our SharePoint: an 'iCal'-type export as you've described, the calendar's RSS feed (which doesn't expand recurring events), or the asmx web services such as "Lists" and "Dspsts".

However, while it's obvious that SharePoint itself is able to calculate recurrence properly, the output from an iCal, rss-feed, and the web services is lacking.  I'd think there should be a relatively simple way to request 'expanded' recurrences via the web services but, unfortunately for me, there isn't.

So, here's what I'm currently doing:

- I'm retreiving a calendar's data by SOAP request to Dspsts.asmx.  (This provides a nice XML document...<Calendar_Row>s).

- And using the "Lists.asmx" GetListItems method as well (because the Dspsts.asmx query is missing the very important 'recurrence' data) and because there's no option to ask SharePoint to expand the recurring events.  "GetListItems" outputs XML nodes which have the "ows_Recurrence" attribute...from which I:

- have to (a) correlate each XML node from GetListItems with the XML nodes from DspSts.asmx (which is WAAYY easier than parsing all the garbage in "GetListItems"; and (b) calculate the recurrences on my own!!

However, when calculating the recurrences on my own I:

- have to GUESS at what sort of model I might or might not encounter in the <recurrence> XML contained in the ows_Recurrence attribute.  (This element doesn't appear to be documented anywhere!)

- then I have to further correlate items which have "Deleted: <event title here>" and then attempt to backpeddle the calculation of the recurrences -- or based on the peculiar combination of EventType, fRecurrence, fAllDayEvent GUESS again at whether or not my calculations will cause duplicate events.

All in all, MY COMPLAINT IS SIMPLY THIS:

- can you (the SharePoint team) PLEASE expose the "query.ExpandRecurrence" functionality somehow in the built-in asmx web services?

- OR, (and I think calendars are just complicated enough to warrant it), add a "Calendars.asmx" web services (which could behave similar to the "Lists.asmx" service) but with options and methods that would take into account the 'uniqueness' of calendaring.  ("Lists.asmx" is a bulky way to syndicate calendar event information).

- OR, publish a complete reference for the "<recurrence>" node and it's various\possible sub-elements.

- OR, fix the "Actions" > "RSS Feed" feature for wss3.0 Calendars -- the fact that the RSS feed doesn't expand recurring events make a calendar's RSS feed completely USELESS wouldn't you agree?

NOTE: In two weeks while working to syndicate a simple calendar, and searching far and wide on the internet, THIS BLOG POST is the only page I've found which even touches on the <recurrence> and its relation to fRecurrence, fAllDayEvent, EventType elements.  If there's more documentation somewhere/anywhere about these items, please post the links somewhere!

ALSO NOTE: What I'm attempting to do is not unlike the requests of dozens of others who have already commented in this post.  It boggles my mind to think that, while trying to simply syndicate 'current events' from a SharePoint calendar, either I've missed something fundamental - or you have.

Is there a question in here anywhere?  Yes:

- Have I missed something entirely?  To get a collection of events from a SharePoint calendar (one which I don't have to manually calculate recurrence!) to display, say, as an RSS feed or to dump into a database table...is there no way to do this?

Saturday, July 07, 2007 12:56 AM by David S

# re: Understanding the SharePoint calendar and how to export it to iCal format

Hi,

Is it possible to get expansion of recurring events in the past using SPQuery. It appears to expand recurring dates from the current datetime forward but I cannot get it to expand recurring events in the past.

Thanks

Donal

Monday, July 09, 2007 6:46 AM by donal mcweeney

# re: Understanding the SharePoint calendar and how to export it to iCal format

hi,

I am facing same error as Andy. Any solution for that?

Tuesday, July 24, 2007 7:39 AM by Ruchi

# re: Understanding the SharePoint calendar and how to export it to iCal format

Any ideas on getting expansion of recurring events in the past using SPQuery?

Thursday, July 26, 2007 2:54 PM by tronn

# re: Understanding the SharePoint calendar and how to export it to iCal format

Hi,

Thought this is an interesting article but I must admit that I just can't understand why MS can't do a decent job with recurring events within SharePoint?

With WSS V2:

No api for expanding recurring events.

Undocumented recurrence data schema (just a few samples in the sdk).

Incomplete documentation for CAML markup related to recurring events.

Starting with WSS V3, one would think that the recurring events "nightmare" would end. But hey :

Still undocumented recurence data schema though this article puts some light on it.

Undocumented api for expanding recurring events (just look at the Query.CalendarDate property for which there is not even a word of explanation in the sdk).

No implementation in the web services query interface.

Moreover the object model implementation seems rather limited (and useless as far as I am concerned) :

It looks like it is impossible to get past occurences of a recurring event.

It looks like you can only get occurences for 2 years starting from current date. From my test, there is no way to get anything else even though you would specify a 01/01/2011 as a value for "DateRangesOverlap".

CalendarDate property is rather mysterious as I can't see much change when setting a value or even not using it.

Considering that MS is obviously using some api (even if it's not written in managed code) for displaying the Event list current events view, I just can't understand why :

- this api is not completely interfaced within the SharePoint Object model.

- the recurence data schema is still not completely documented in a reference section.

Being now 4 years that people are struggling (or reinventing the wheel) with recurring events in SharePoint, a reasonnable approach would be that someone from MS publish a .net version of the inhouse used algorithm, even if it is unsupported. Codeplex?

Of course a better approach would be as someone suggested some kind of specialized class for querying events data.

Regards,

Friday, August 03, 2007 11:46 AM by Frederic LATOUR

# re: Understanding the SharePoint calendar and how to export it to iCal format

Hello Frederic LATOUR,

Well said!!

Sunday, August 05, 2007 4:57 PM by David S

# re: Understanding the SharePoint calendar and how to export it to iCal format

I absolutely agree with Latour. I seriously wonder how many hours have been wasted by developers researching and redeveloping procedures that are either lacking or not documented.

Thursday, August 09, 2007 5:38 PM by Jason Y

# re: Understanding the SharePoint calendar and how to export it to iCal format

Is it possible, from a SharePoint user perspective (or otherwise) for a single event to be added (at the same time) to multiple SharePoint calendars?  Alternatively, is it possible to "link" calendars so an event added to one automatically feeds into another, unless it is set not to link into that calendar?  How, in either case, please?

Tuesday, August 14, 2007 3:40 PM by Simmons

# re: Understanding the SharePoint calendar and how to export it to iCal format

I am trying to access all the items in Calender including recurrances irrespective of date range. I am not able to do it.Can u plzz give a solution.

Thanks in advance.

Peter

Wednesday, August 22, 2007 5:38 AM by Peter

# re: Understanding the SharePoint calendar and how to export it to iCal format

Hi,

I have a list with start and end dates.

I create a calendar view based on those dates.

When I look at the calendar view, the item bar is always 1 day less.

I find this frustrating, since there is no 'alldayevent' function for this item.

-Edward

Wednesday, August 22, 2007 5:43 PM by Edward M. Meshuris

# re: Understanding the SharePoint calendar and how to export it to iCal format

Just puting in my 2 cents worth and adding my kick up the SharePoint teams backside!

Just look at some of these comments - you are driving your customers insane with this recurring event nightmare - please make it stop... please... ;)

Saturday, August 25, 2007 8:58 AM by Ryan

# Recurrence in Room and Equipment Reservations

Hi ,

I am trying to use the Room and Equipment Management System to book a  meeting room(it is the resource here).

How do i book it for recurring dates..

I know that the template is to be modified supoorting recurring events.

Any other simple way

Tuesday, August 28, 2007 4:35 AM by Thilakka

# re: Understanding the SharePoint calendar and how to export it to iCal format

Hi Matt,

I think your ical.aspx code contains a little bug in WriteTimeZones - although to be honest I have not tested this, its just from visual inspection.

You assume that daylight savings starts at the start of the year and ends at the end of the year.

It doesn't in the southern hemisphere!

Tuesday, August 28, 2007 10:33 AM by Ryan

# 2007 MOSS Resource Links (Microsoft Office SharePoint Server)

2007 MOSS Resource Links (Microsoft Office SharePoint Server) Here is an assortment of various 2007 Microsoft

Wednesday, September 12, 2007 11:07 AM by The Boiler Room - Mark Kruger, Microsoft SharePoint MVP

# re: Understanding the SharePoint calendar and how to export it to iCal format

Hi,

Now can i edit a single instance of the recurring event through code.

Monday, October 01, 2007 3:34 PM by Anonymous

# re: Understanding the SharePoint calendar and how to export it to iCal format

Great Blog.

I would like you to check kwizcom: SharePoint Calendar Web Part.

I try it and find out it is a great webpart.

Sunday, October 28, 2007 3:01 PM by SharePoint Calendar Web Part

# re: Understanding the SharePoint calendar and how to export it to iCal format

Any easy way to expand recurring events for a query against the CrossListQueryCache?

I am doing a calendar rollup and would like to accurately represent recurring events.

Thursday, November 01, 2007 4:21 PM by Brian Bolton

# re: Understanding the SharePoint calendar and how to export it to iCal format

This is the code I have so far but it's not expanding events.  It is just giving me one instance of a recurring event.  I'd like it to give me an instance of each recurring event.

CrossListQueryInfo crossListInfo = new CrossListQueryInfo();

crossListInfo.ViewFields = "<FieldRef Name=\"Title\" Nullable=\"True\" Type=\"Text\"/>" +

                           "<FieldRef Name=\"EventDate\" RefType=\"StartDate\" />" +

                           "<FieldRef Name=\"EndDate\" RefType=\"EndDate\" />" +

                           "<FieldRef Name=\"RecurrenceID\" />" +

                           "<FieldRef Name=\"FileRef\" />" +

                           "<FieldRef Name=\"RecurrenceData\" />" +

                           "<FieldRef Name=\"fRecurrence\" />";

crossListInfo.Query = "<Where><DateRangesOverlap><FieldRef Name=\"EventDate\" /><FieldRef Name=\"EndDate\" /><FieldRef Name=\"RecurrenceID\" /><Value Type=\"DateTime\"><Month /></Value></DateRangesOverlap></Where>";        

crossListInfo.RowLimit = 100;

crossListInfo.Webs = "<Webs Scope=\"Recursive\" />";

crossListInfo.Lists = "<Lists ServerTemplate=\"106\">";

crossListInfo.WebUrl = "depts/deptname";

crossListInfo.UseCache = true;

SPSite querysite = new SPSite("http://server/sites/divsite/");

CrossListQueryCache xlqCache = new CrossListQueryCache(crossListInfo);

DataTable results = xlqCache.GetSiteData(querysite);

Friday, November 02, 2007 4:12 PM by Brian Bolton

# re: Understanding the SharePoint calendar and how to export it to iCal format

Is there a way to have sharepoint constantly exporting to iCal.  As a mixed shop our intranet runs a sharepoint calendar, but the mac department would like it in iCal.  Do an export everytime they change the calendar becomes a burden.  Since iCal can do subscriptions, is there a way to link it to sharepoint?

Thanks

Sunday, November 18, 2007 11:06 AM by Justin

# re: Understanding the SharePoint calendar and how to export it to iCal format

Hello

Has anyone got this code to work as expected. I am trying to get all types of  events ( single, allday, recurring events) for a date and it seems impossible to get it. The problem seems to be with the actual instances of the recurring events. I have not been able to get any code that would give the actual instances of the recurring events . I do get the Master Series recurring Event but the actual events seems to be impossible to get, Any one who has luck to get all events for a date please post the code . Thank you very much BC

Monday, December 10, 2007 1:47 PM by BC

# MOSS 2007 - Content Query Web Part - Start Date 'is equal to' [Today] - fails for recurring events

Great explanation of the Calendar parameters, I'm hoping you can explain how to get around the change in values when dealing with recurring events and content query web parts' filters.

If:

EventDate is "Start date and time" for single events,

and:

EventDate is "Start date and time set for the recurring event when it was created, which may be an earlier date than the first instance of the recurring event.",

how do you do a lookup and display for recurring events similarly to how one would lookup a single event, eg: Start Date 'is equal to' [today] ?  Is there something you can do with the Duration parameter?

Thanks!

Tuesday, January 08, 2008 8:43 AM by RD

# re: Understanding the SharePoint calendar and how to export it to iCal format

RD - For Recurring events, the EventDate has two parts; the datepart is when the event was created, but the time part is start time of the event.

Together with using RecurrenceData, the Start time and Duration I should be able to construct all instances of recurring event (although I am not sure wherther timezone will play any part), but is there a simple Query (against CrossListQueryCache) that I can perform to get all recurring events within a given date range.

Alternatively, has anyone gone through the manual process of working out all recurring event instances?

Thursday, January 10, 2008 4:55 AM by Qamar

# re: Understanding the SharePoint calendar and how to export it to iCal format

anyone ever get this work without this error? "Year, Month, and Day parameters describe an un-representable DateTime."

Thursday, January 10, 2008 4:16 PM by dennis elsensohn

# re: Understanding the SharePoint calendar and how to export it to iCal format

Shame the is no conflict resolution in the sharepoint calendar

Thursday, January 17, 2008 6:36 AM by stefan demetz

# Synchronizing with Windows SharePoint Services, Part 1

Introduction There may be occasions where you will need to synchronize third party programs with Windows

Monday, January 21, 2008 4:37 PM by Microsoft SharePoint Developer Documentation Team Blog

# Synchronizing with Windows SharePoint Services, Part 1

Introduction There may be occasions where you will need to synchronize third party programs with Windows

Monday, January 21, 2008 5:19 PM by Noticias externas

# Modifying SharePoint calendar to compress or eliminate weekends

I have been trying to find someone who can tell me how to eliminate or compress the weekend columns in the sharepoint calendar.  No luck, though I did find an option to start on monday.

Do you know how or can you direct me to some information on this topic?  thanks

Monday, February 04, 2008 5:39 PM by John Wells

# re: Understanding the SharePoint calendar and how to export it to iCal format

Hi, this post is very helpfull, but howto update item from calendarItems collection without "Expanded recurrence items can not be updated." exception?

Thanks

Tuesday, February 05, 2008 9:57 AM by Tired

# re: Understanding the SharePoint calendar and how to export it to iCal format

On the topic of recurring events not showing in some views, after taking a look, I find that the moment you edit an instance of an item, it actually becomes an item, and thus appears in my custom 30 day list as well as current events.

Is there a way to simply change the value that is changed upon clicking "Edit Item" whenever I create a recurring series so that I can see all items in a series?

Is the field that is changed the itemType as per the table at the top of this page?

Thanks!

Thursday, February 07, 2008 5:07 AM by Paul Perry

# Regarding recurring event

Hi Guys,

  I tried to create a recurrence event using WSS Webservices.I used RecurrenceDate tag to set the recurrence pattern.Here is how the my Recurrence data looks.

<recurrence>

<rule>

<firstDayOfWeek>su</firstDayOfWeek>

<repeat>

<daily dayFrequency="1"/>

</repeat>

<repeatForever>TRUE</repeatForever>

</rule>

</recurrence>

But WSS3.0 Calender is not able to recognize thi event.When i click edit item and click ok.It says recurrence exception of the old event will be lost.Why is this problem coming.Can any one send me the format of the RecurrenceDate Field i need to pass and other things which i need to take care.

This event is getting listed in All Events though.

Wednesday, March 05, 2008 9:46 AM by Murali

# re: Understanding the SharePoint calendar and how to export it to iCal format

Great stuff, why does MS not have this as a standard feature?

I had not trouble installing, but in my case it skips "Deleted" events, rather important when there is money involved!

It would also be very useful if it 1) expanded recurring events and 2) accepted filters for a date period (eg one month)

Sunday, March 09, 2008 9:04 PM by Stephen Sheaf

# re: Understanding the SharePoint calendar and how to export it to iCal format

Has anyone been able to interact with MOSS using UpdateListItems?  I have

been using it as my applications primary means to interact with MOSS.  I can

retrieve and modify any calendar item using UpdateList items sending cmds in

batch xml format and it works fine (its not easy but it does work).  I'm

stuck on writing modifications to recurring events.  I.E. deleted or

otherwise modified individual or recurring items within a recurring event.

I have found several great articles such as: How to add recurring items:

http://msdn2.microsoft.com/en-us/library/ms434156.aspx and this one;

but these articles don't talk about writing events to the sharepoint event

list.  Thus far I've gotten by but supporting recurring event individual

ocurrence changes has been frustrating.  I can write the deleted instance of

the recurring event to the event list but its not associated to the

masterItem.  And not coincidentally it isn't displayed in the sharepoint

calendar view, it does show up in the all events display.  From this post I've found to associate the deleted instance you must set the

MasterSeriesItemID with the itemID of the parent recurring event and the

RecurrenceID with the originalDate/Time of the modified occurrence.  Also

I've found but it's not documented anywhere imperical evidence looking at the underlying db table for list data that the UID

field must match the parent items UID field (I did this by viewing what's

done in the MOSS UI when modified to what happens when I do from my

application)

But even after all of this I can't display in the calendar view list items

that are recurring with deleted or otherwise modified individual ocurrences,

Does anyone know what I'm missing?

Tuesday, March 18, 2008 10:41 PM by SteveSchaff

# re: Understanding the SharePoint calendar and how to export it to iCal format

All I can help with recurring events as long as they do not include modified or deleted instances.  The biggest problem I ran into is that all day recurring events need to be in ztime. I've also found in your recurrence xml string you can't use double quotes, this is because it gets embedded in the batch cmd in the xml as an html encoded field.  My recurring events work great.  Feel free to send me questions though.

Wednesday, March 19, 2008 7:45 PM by SteveSchaff

# re: Understanding the SharePoint calendar and how to export it to iCal format

All - I finally figured out modifications to recuring item instances!  So I thought I would share it - when you submit a NEW recurring item or an update to a recurring item you get back a new ows_UID save this cuz you have to send any modifications or deletions using that UID...

Thursday, March 20, 2008 10:01 AM by SteveSchaff

# re: Understanding the SharePoint calendar and how to export it to iCal format

I ran through the installation and was able to install and deploy the solution. I rebooted the server but, I still dont see the ICAl in the site features.

What am I doing wrong?

Thanks,

Steve

Wednesday, April 02, 2008 11:28 AM by Steve Peterson (steve@mcmillaninc.com)

# re: Understanding the SharePoint calendar and how to export it to iCal format

Never mind... I was being dumb.

I was looking at site features, not site collection features.

I logged in as an admin and the site collection features were then available.

Steve

Thursday, April 03, 2008 10:37 AM by Steve Peterson (steve@mcmillaninc.com)

# re: Understanding the SharePoint calendar and how to export it to iCal format

The information is great, but...

I'm having problems expanding a recurring all-day event.  If anyone can point me to some info, that would be great.

Thanks.

karl

Tuesday, April 22, 2008 5:04 PM by Karl H

# re: Understanding the SharePoint calendar and how to export it to iCal format

How do I go about creating a calendar which only returns events and recurrence entries within a specific time frame?

I'm only ever able to test against the EventDate and I don't understand how to reference the dates generated for recurrence entries.

Using WSSv3 and SPD2007

Wednesday, April 30, 2008 9:46 AM by Roojo

# re: Understanding the SharePoint calendar and how to export it to iCal format

Karl,

This post is the best info I can think of for breaking out the recurring all-day event which part is giving you trouble?

Wednesday, May 07, 2008 10:08 PM by SteveSchaff

# re: Understanding the SharePoint calendar and how to export it to iCal format

Hi,

I tried to use this SPquery:

-----

"<Where><DateRangesOverlap><FieldRef Name=\"EventDate\" /><FieldRef Name=\"EndDate\" /><FieldRef Name=\"RecurrenceID\" /><Value Type=\"DateTime\"><Month /></Value></DateRangesOverlap></Where><OrderBy><FieldRef Name=\"Title\" /></OrderBy>"

-----

,but it returns all the recurrences in the actual month view.

Then, If we are at 2 June, the query returns the recurrences from 26 May to 6 July.

How could I see the recurrences from today to 30 days ??

Thanks.

Wednesday, June 04, 2008 4:07 AM by Joan

# re: Understanding the SharePoint calendar and how to export it to iCal format

Hi Joan,

You could make 2 CAML queries, pass the result to a DataTable, set the PK for each DataTable and finally marge the 2 DataTables.

Then you can select only the events in the next 30 days.

Salut,

Àlex.

Thursday, June 19, 2008 10:56 AM by Àlex

# re: Understanding the SharePoint calendar and how to export it to iCal format

Hi Joan,

You can set the CalendarDate property of the SPQuery to today's date.

Tuesday, June 24, 2008 4:45 PM by Eddy

# re: Understanding the SharePoint calendar and how to export it to iCal format

Is there a way to generate/create the <recurrence> xml? I am looking for a recurrence XML string generator. I have been researching the interweb for a long time with no luck. Plz email me: mistertall2004@yahoo.com

Wednesday, June 25, 2008 11:27 AM by aeltawil

# re: How to modify a calendar view type?

I'm trying to work with calendar views but missing some basic info:

1. If I have a SPView calendar object, how can I tell its type (month/week/day)?

2. How can I modify the type, e.g. from week to day?

Thanks in advance

Thursday, July 03, 2008 10:00 AM by Sruli

# re: Understanding the SharePoint calendar and how to export it to iCal format

I wonder how I can handle a calender view given in a SPView object:

1. How can I tell the calendar type (month/week/day)?

2. How can I change the calendar type, e.g., from month to week?

Thanks in advance

Thursday, July 03, 2008 10:57 AM by Sruli

# re: Understanding the SharePoint calendar and how to export it to iCal format

I need to add a link on Event Detail page to open the iCal format event directly by using webcal:// protocal.  The link would be like "Add to iCal calendar".  Could anyone tell me how to implement it?  Thanks in advance!

Friday, July 04, 2008 11:35 AM by John

# re: Understanding the SharePoint calendar and how to export it to iCal format

I have problem with calendar view. Hope you can help.

I have a SPView object of Calendar type.

How can I change it's default type programatically, e.g., from Month to Week or Day calendar?

The calendar type is located in SPView.schemaXML member, but this is a readonly property. How can I change it?

Thanks in advance

Sruli

Tuesday, July 08, 2008 5:21 AM by Sruli

# re: Understanding the SharePoint calendar and how to export it to iCal format

Thank you for the post!

I wonder where can I find the schema of XML in RecurrenceData field.

It will be helpful if someone gives me an example with full element of the XML.

Friday, July 25, 2008 4:29 AM by Rex

# Links 2009-04-06

SharePoint Customizing SharePoint Context Menus Hidden SharePoint Lists, Fields, and other Advanced List

Monday, April 06, 2009 3:58 PM by Gunnar Peipman's ASP.NET blog

# web tasarım

Monday, August 03, 2009 6:57 AM by web tasarım

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker