CAMLQuery Contains issue

May 4, 2012 at 7:03 PM

Any ideas why this isn't working?

var myQuery = "<Query><Where><And><Or><Eq><FieldRef Name='First' /><Value Type='Text'>First</Value></Eq><Eq><FieldRef Name='Second' /><Value Type='Text'>Second</Value></Eq></Or><Contains><FieldRef Name='DateTime' /><Value Type='Text'>2010-10-12</Value></Contains></And></Where></Query>";

But this is working..

var myQuery = "<Query><Where><And><Or><Eq><FieldRef Name='First' /><Value Type='Text'>First</Value></Eq><Eq><FieldRef Name='Second /><Value Type='Text'>Second</Value></Eq></Or><Eq><FieldRef Name='DateTime' /><Value Type='Text'>2010-10-12 11:25:35</Value></Eq></And></Where></Query>";

Coordinator
May 4, 2012 at 8:21 PM

Is Contains even valid with a date column?

M.