Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Birthdays this week
Message
 
 
To
18/03/2009 17:28:48
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01389309
Message ID:
01389323
Views:
72
See http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/Q_21419664.html?qid=21419664 and
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=70975

I would solve this problem by converting dates to one common year. We would need to figure out leap year too.

I actually had the problem solved back in a day, but I forgot now...

>>Hilmar,
>>
>>>From a list of people with birth dates, how do I find out who has a birthday within a certain range of dates - e.g., the current week?
>>
>>
>>select * from theTable where date( year( ldStart ), month( dob ), day( dob ) ) between ldStart and ldEnd
>>
>
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform