I realized in a customer project that the results of my caml query does not match what we expected. The result was more, after we analyzed this issue, we got the point. The caml query ignored the time – it only used our filter with the date but not the time. After googling, we found really quick the missing step. You have to tell the filter to include the time. By default it does not include.
<where><geq><fieldref Name='CreateDate'></fieldref><value Type='DateTime' IncludeTimeValue='TRUE'>29.04.2014 07:00:00</value></geq></where>
That’s the important part: IncludeTimeValue=’TRUE’
The strange thing is, that it does not work. I also tried with OffsetDays Parameter, which did not work either. So maybe this is a bug? Does anyone know?
The article or information provided here represents completely my own personal view & thought. It is recommended to test the content or scripts of the site in the lab, before making use in the production environment & use it completely at your own risk. The articles, scripts, suggestions or tricks published on the site are provided AS-IS with no warranties or guarantees and confers no rights.
He is Consultant for SharePoint Solutions for collaboration, communication and business processes. He provides his customers applications based on standard features as well as development or combining the power of several microsoft tools like Dynamics CRM. In his free time he tries to collect tipps and worthy experience in this blog.