Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Birthdays this week
Message
 
 
To
19/03/2009 20:00:42
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01389309
Message ID:
01389857
Views:
45
>>>The date() function in your example would fail fail if a person happened to be born on Feb. 29 - I believe that I'll have to convert those dates to Feb. 28, using an iif().
>>
>>People born on Feb. 29 have birthday every 4 years :)
>
>Don't they spread it so they take six hours of it on other years - six hours should be enough to have a party, eh?

Do you see why the program only works when there is no span between years?
PRIVATE test
ldStart = DATE(2008,12,31)
ldEnd = DATE()

SYS(3054,12,'test')

lnMonth1 = month(ldStart)
lnDay1 = day(ldStart)

lnDiff = ldEnd - ldStart

select dDOB from Patients where dDOB is not null and dDOB <> {} and dDOB ;
between date(year(dDOB),lnMonth1,lnDay1) and (date(year(dDOB),lnMonth1,lnDay1) + lnDiff) ;
ORDER BY dDOB INTO CURSOR curTest nofilter

BROWSE FOR MONTH(dDob) = 2

_cliptext = test
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform