Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A twist on age calculation.
Message
 
 
To
30/12/2004 15:04:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00973330
Message ID:
00973419
Views:
39
>
>>The days part is calculated last so I guess it should be aplied first. See if this is better.
dob = GOMONTH(dt - 18, - (33*12+6))
>>dob = GOMONTH(dt-dd, - (yy*12+mm))
>
>Seems to work on Rick's problem sample and the few others I have identified. Nicely done. Thanks!

Jim,

Expanding on my previous observation, days applied first, month second and years last. I'm not sure is it better than previous one, though. :)
dob = GOMONTH(GOMONTH(dt-dd, - mm), -yy*12)
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform