>>>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