Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining a birthday
Message
 
 
To
22/01/2002 15:29:41
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00608612
Message ID:
00608616
Views:
17
You can use MONTH() and DAY() functions
WHERE MONTH(dob) = MONTH(DATE()) AND DAY(dob) = DAY(DATE())
or
WHERE DATE( YEAR(DATE()), MONTH(dob), DAY(dob)) = DATE()   
or
WHERE dob = DATE( YEAR(dob), MONTH(DATE()), DAY(DATE()))
I would go with the last one because it could be Rushmore optimazable if you've index on dob


>Hi Folks -
>
>If I have a table which contains a contact name and date field, dob. What command would I use to filter the data down only to show the contacts with a birthday (based upon the dos clock date) of today ?
>
>Would I need to convert the month and day to character? If so is that the only way?
>
>Thanks,
>
>Larry
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform