At the moment I'm working on the new and improved version of the Macaw Birthday web part.
This web part uses the Birthday field of the user profile to query for people who will have their birthday in the next "x" days. Where you can set "x" from the web part property pane. There's a bunch of other stuff that can be set from the pane, but that's not causing problems right now.
The SQL queries you can perform against the MOSS 2007 index do not only support negative date comparisons on complete dates. This looks like (from the SDK):
...WHERE LastModifiedTime <=DATEADD (DAY, -5, GETGMTDATE())
Which means that you can only compare against dates in the past, where I want to find dates from today till "x" days from now, and I want to disregard the year, which is also not possible.
This is my next problem. Even though the class is called datenoyear it stores a year with it when you save it. And when you use the search objects to retrieve the field it returns a year with that. In my case it always returns the year 2000. If I can be sure that this is the year that is always added to a datenoyear field that would help a lot because then I would no that I need to query for a date between today in 2000 till today +"x" in 2000. But I can't find any documentation on that.
Other possible approaches are the DataColumn Expressions and the DataView RowFilter, but that will only work if I know for sure that the year will always be 2000. In that case I can query for each day separately like:
DataView.RowFilter = "Birthday = #5/13/2000# OR Birthday = #5/14/2000# OR Birthday = #5/15/2000# OR Birthday = #5/16/2000#"
if "x" would have been four.
Right now I think I'm just going to filter when writing the HTML, which means that I have a DataTable with all user profiles present on the environment, instead of just the user profiles of the people who have their birthday in the next "x" days, but I'm out of inspiration right now. If anyone has another suggestion I would appreciate that..
Oh, and if anyone can tell me for sure that the year stored for datenoyear fields is 2000 than I would be grateful for that information as well...