title: CAML Query Comparing DateTime with Eq
body: <p>I'm trying to put together a CAML Query that compares two DateTime objects, but I <strong>cannot get it to work using an Eq comparison</strong>. From my testing I can get Gt, Lt, Geq, Leq to work with DateTime comparisons, but Eq doesn't seem to work at all, ever.</p>
  
  <p>The first object is a Date and Time field (produced by InfoPath and saved to a Date and Time field in a SharePoint list), the current example has "3/14/2012 12:00 AM". I have attempted using the [Today /] value, using a hard-coded value in ISO format 2012-03-14T00:00:00Z but nothing has worked so far. I have experimented with IncludeTimeValue, setting it to true/false, no improvement.</p>
  
  <p>My current query looks a little like this,</p>
  
  <pre><code>&lt;Query&gt;
   &lt;Where&gt;
    &lt;Eq&gt;
     &lt;FieldRef Name="SomeDateTimeField" IncludeTimeValue="TRUE" /&gt;
     &lt;Value Type="DateTime" IncludeTimeValue="TRUE"&gt;2012-03-14T00:00:00Z&lt;/Value&gt;
    &lt;/Eq&gt;
   &lt;/Where&gt;
  &lt;/Query&gt;
  </code></pre>
  
  <p>This returns nothing, even though I have an item with that date time in the list. Any ideas? </p>