Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CAML query SharePoint 2007

Posted on 2013-10-29
2
Medium Priority
?
423 Views
Last Modified: 2013-11-12
I have a list that has an "EventDate" column.  I want to be able to show items that are between the next 30 - 60 days.   I have the following query but not working correctly

<View><Query><Where><And><Geq><FieldRef Name="EventDate"/><Value Type="DateTime"><Today Offset="31"/></Value></Geq><Leq><FieldRef Name="EventDate"/><Value Type="DateTime"><Today Offset="60"/></Value></Leq></And></Where></Query></View>

Open in new window


Having the <And> returns nothing and the <Or> includes everything less than 60 and less than 30.

Any ideas?
0
Comment
Question by:Isaac
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 2000 total points
ID: 39610930
Hi,
sorry I have currently no 2007 system at hand, but could you try to adjust the attribute name "Offset" to "OffsetDays" like:
<View><Query><Where><And><Geq><FieldRef Name="EventDate"/><Value Type="DateTime"><Today OffsetDays="31"/></Value></Geq><Leq><FieldRef Name="EventDate"/><Value Type="DateTime"><Today OffsetDays="60"/></Value></Leq></And></Where></Query></View>

Open in new window


HTH
Rainer
0
 
LVL 5

Author Closing Comment

by:Isaac
ID: 39642254
Perfect!
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question