views:

38

answers:

1

Is it possible to do a date based query using xpath syntax? Everything I have researched inidicates that this is not possible. I am querying a group of calendars and only want to bring back a month's worth of data - what strategies could I use to accomplish this?

8/10/2010: Edit for more information

I am building a notification system where users can get reminders for particular events. Reminders can come 4 weeks, 3 weeks, 2 weeks, 1 week in advance. I am storing this information in separate SQL database.

I need to do one of two things to keep my code as efficient as possible:

  1. Do a select from my notifications table, then only bring back events with notifications associated with them.
  2. Only bring back 4 weeks of events and then see which have notifications attached to them.
A: 

Without knowing more, I'd say you should be looking at your information architecture. With calendars, news and similar type content, it is most often a good approach to arrange the items in some sort of archive.

Company News
- 2010
  - 01
  - 02
  ...
  - 12

And so on.

There's even a Shared Source project designed to help you maintain more or less excactly a structure such as this. Take a look at http://trac.sitecore.net/NewsMover

Mark Cassidy
Your approach is a step in the right direction. When I do my "select" I could pull the current month and the next month instead of worrying about the xpath stuff.
sestocker