Skip navigation

Calendaring: Get Appointments for Date Range

In CDO 1.21, to retrieve all appointments for a calendar required creating a filter and assigning a start and end date for that filter. Once the filter was in place, the messages collection only contained appointments within that date range. Now that Exchange 2000 has moved on to primarily use its OLEDB provider to retrieve data, we need to learn how to create an SQL statement to retrieve appointments for a date range. Looking at this, we need to make sure we take care of all circumstances. If we have date range, we need to retreive 4 types of appointments. 1) Ones that start before the date range, and end in the date range. 2) Ones that start and end in the date range. 3) Ones that start before the date range and end after the date range. 4) Ones that start within the date range and end after the date range. Here is a picture:

                |------------------------|
              1:00pm  (our date range) 4:00pm

1) 12:00pm|----------------|2:00 pm
2)                  2:00 pm|-------|3:00pm
3) 12:00pm|----------------------------------------|5:00pm
4)                  2:00 pm|-----------------------|5:00pm       


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish