I was playing around with Search Based solutions in SharePoint 2010, inspired by the presentation of Scot Hillier (here). I really see a lot of potential for Search-Based solutions. Why bother with custom code, mucking around with timerjobs and such, trying to scrape together information from lists, sites and sitecollections, if you have all that information at your disposal in the search database?
So, to try my hand at a Search-Based solution, I thought I’d make a My Tasks webpart. A lot of customers would like to have a webpart that shows all tasks assigned to them, without them having to look through every site they are a member of.
Building the webpart wasn’t so difficult, but when I deployed the webpart, I was puzzled by the result. The webpart showed the three tasks I expected. What I didn’t expect were the deadlines (due date field).
Please note the deadline of the first task: 20-09-2011 (dutch date format: dd-mm-yyyy)
I was sure I entered the due date 21-09-2011, right??
Let me check the task…
What the …!?
Why is search (KeywordQuery) returning an incorrect date?
And this turned out to be the case for all date fields.