Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Birthdays this week
Message
 
 
À
19/03/2009 20:00:42
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01389309
Message ID:
01389857
Vues:
44
>>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform