David,
I don't really like all the suggestions, because they don't use existing index on date, if there is an index. I think we need to convert ldStart and ldEnd to the year of DOB and not vs. versa.
>Hilmar,
>
>Sergey's correction fixes the year rollover issue.
>
>>Looks interesting - I have to analize it later. Do you think that would fail for a date range spanning end-of-year? E.g. {^2009-12-30} to {^2010-01-05}. If it does fail (and works otherwise, as I think it would), I could code that case separately - dividing into two ranges.
If it's not broken, fix it until it is.
My Blog