Filtering Data Using CAML Query

While filtering data using CAML query for date time sharepoint ignores time part, if we want to have filter on time as well, then how to achieve this.e.g. Query will be like this to achieve above requirement

“<Where><Eq><FieldRef Name=\”EndDate\” /><Value Type=\”DateTime\” IncludeTimeValue=’TRUE’>” + SPUtility.CreateISO8601DateTimeFromSystemDateTime(DateTime.Now) + “</Value></Eq></Where>”

The good practice is to have date time using SPUtiliy class and we need to add attribute IncludeTimeValue=’TRUE’ in the query to have time consideration in filtering process.


~ by Neha Sinha on February 21, 2008.

2 Responses to “Filtering Data Using CAML Query”

  1. cool.. thanks

  2. Hi Neha,
    Thanks a lot ,It did a great help to me.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: