Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Birthdays this week
Message
From
19/03/2009 22:20:26
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01389309
Message ID:
01389860
Views:
41
>>>>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
Yes, because for anyone born on 1944-1-2 it will try to find that date between 1944-12-31 and today, which is an interval which starts about 258 days later.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform