Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A twist on age calculation.
Message
From
30/12/2004 14:32:58
 
 
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:
00973373
Views:
19
Hi Rick,

>Like I said, it just depends on how accurate you want to be. GOMONTH can change the day of the month when beginning from a date with a day of 29, 30, or 31. To be fully accurate you need to adjust for this.

Noticed the checking in your code for this. Thanks for the explanation.

>I used my class to run some examples here, but the results can be derived and checked easily enough by hand. For example, 09/13/1868 plus 33 years = 09/13/1901, plus 6 months = 03/13/1902, plus 18 days = 03/31/1902. If you start with 09/12/1868 you end up with 03/30/1902.

"by hand" is my immediate problem ;-) I've got over 30K records to massage.

>If you can live with a little variance in the result then certainly the simpler solutions are okay, though.

OK, I'm using Sergey's code to scan the data first, running the result through your class, then adjusting the "DOB" with any variance. See any problems with this approach?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform