Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Birthdays this week
Message
 
 
To
19/03/2009 10:57:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01389309
Message ID:
01392331
Views:
106
Right, if that's the case, an empty date in dob would generate an error and NULL will be treated as current date.
See Birthday Query in VFP for a query that handles empty and null dates w/o additional checks.

>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)
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform