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:
01152414
Views:
20
This message has been marked as the solution to the initial question of the thread.
One small adjustment
SELECT * FROM mytable ;
  WHERE DATE(YEAR(DATE()), MONTH(birthdate), DAY(birthdate)) BETWEEN DATE() AND DATE() + 30
     OR DATE(YEAR(DATE())+1, MONTH(birthdate), DAY(birthdate)) BETWEEN DATE() AND DATE() + 30
* or even better
ldStart = DATE()
ldEnd 	= ldStart + 30
SELECT * FROM mytable ;
  WHERE DATE(YEAR(ldStart), MONTH(birthdate), DAY(birthdate)) BETWEEN ldStart AND ldEnd
     OR DATE(YEAR(ldStart)+1, MONTH(birthdate), DAY(birthdate)) BETWEEN ldStart AND ldEnd
>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
>>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform