I need a CAML query to compare the Lookup Value and not ID. My Lookup Value is of DateTime. The startTime and endTime are both DateTime.
Something is wrong with the code below. I searched through the web but all I can find are Type=DateTime and not Lookup.
"<Where>" +
"<And>" +
"<Lt>" +
"<FieldRef Name='" + EventSessionStartTime + "' />" +
"<Value Type='Lookup' IncludeTimeValue='TRUE'>" + endDate + "</Value>" +
"</Lt>" +
"<Gt>" +
"<FieldRef Name='" + EventSessionEndTime + "' />" +
"<Value Type='Lookup' IncludeTimeValue='TRUE'>" + startDate + "</Value>" +
"</Gt>" +
"</And>" +
"</Where>";