Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Upcoming Birthdays - Number of Days from Today
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01152408
Message ID:
01152411
Views:
19
I'll give it a try... let you know how it goes shortly....

Thanks

>Try
>SELECT * FROM mytable ;
>	WHERE DATE(YEAR(DATE()), MONTH(birthdate), DAY(birthdate)) BETWEEN DATE() AND DATE() + 30
>
>>
>>You guys have probably already figured this one out years ago.... but this is the first time I need this. I am converting some code over that works, but it uses SCAN/ENDSCAN and does NOT use SQL.
>>
>>Question.
>>
>>Given a table of patients with their birthdays in it. I wish to query the table to return the patients who have birthdays within TODAY's DATE and a given number of days in the future (say 30 days from today).
>>
>>Any straightfoward code that employs SQL? The code I am working on used SCAN and ENDSCAN to go through the patient table, figure out if the "birthday" needs correcting to today's year, or next years, and then that value is use in a BETWEEN statement to see if the "birthday" is between DATE() and DATE() + NUMBER OF DAYS IN THE FUTURE.
>>
Tommy Tillman A+ NetWork+ MCP
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform