Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Birthdays this week
Message
From
19/03/2009 10:57:40
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01389309
Message ID:
01389527
Views:
103
to be picky, if dob can be empty or null then

where !empty(dob) and !isnull(dob) and
( DATE( YEAR( ldStart ), MONTH( dob ), DAY( dob ) ) BETWEEN ldStart AND ldEnd
OR
DATE( YEAR( ldEnd), MONTH( dob ), DAY( dob ) ) BETWEEN ldStart AND ldEnd)

>Try
>
>SELECT * FROM theTable 
>	WHERE 
>			DATE( YEAR( ldStart ), MONTH( dob ), DAY( dob ) ) BETWEEN ldStart AND ldEnd
>		OR 
>			DATE( YEAR( ldEnd), MONTH( dob ), DAY( dob ) ) BETWEEN ldStart AND ldEnd
>
>>I am sure this has been discussed before, but I never paid much attention to the issue... until now, when I need it.
>>
>>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?
>>
>>I could write some kind of loop, or complex logic, but I suspect there must be some easier way.
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform