Kevin:  I suggest that you do NOT do this type of calculation in Maptitude. Maybe it can really do it just fine , but I would do it in SAS, Stata, etc. So that you can use the code to something similar later. I do the calculations in SAS including date stuff because SAS is so good at doing this. Then export to a DBF file and THEN take it into Maptitude where it can do its thing. SAS handles dates very well to the day. Functions are available for differences. All stat packages do these calculations with relative ease.
 
Dick Hoskins
WA State DOH
Olympia, WA
 


From: Chris Wagner [mailto:[EMAIL PROTECTED]
Sent: Friday, April 01, 2005 8:26 AM
To: [email protected]
Subject: Re: [Maptitude] Computing a Person's Age from a Given Date of Birth

well to start with  if you don't need to get  down to the day
where DOB = 19691123

Add an Age field
Edit >Fill   Formula
2005-value(left(string(DOB),4))      where 2005 is the year

as for months and days ..... 

value(substring(I2S(dob),5,2))-4        where the -4  would = April     It will return a negative or positive on if the month has passed or not. 
 
Havn't figured out how to get that to convert into the age   but it can't be far off

Chris Wagner

Kevin Byrnes wrote:
Does anyone in the user group know of any functionality or ability
within Maptitude to read the system date and update a computed "age"
field based on the difference between the hard-coded Date of Birth on a
client record and the system date?  I really need this capability to
process a huge (5.5 million record) file and to recompute the age over
time whenever the file is re-opened.

The Date of Birth field is stored as an Integer (4 byte) value, with the
format (e.g.)  "19691123": where 1969 = year, 11= month, 23 = day

Please advise or assist if possible & many thanks in advance to anyone
who can provide a solution!

Thanks,
Kevin Byrnes
Va Dept for the Aging


Yahoo! Groups Links

Reply via email to