Hi Jim, Thank you for noting the problem with my suggestion.
The JDATE function does indeed return an integer which the Rbase documentation says is in the format of YYYYDDD for versions 6.1a and up. Mathematically, two JDATE results can not be simply subtracted from each other to get a meaningful or useful result that continues to follow the YYYYDDD format. I do believe that the number of whole years between two dates using the JDATE function can yield a person's true age if used as follows: Set v age to (aint((jdate(.#date))-(jdate(.vbirthday))/1000)) Thank you for the correction, Dave Fitts State of Maine Risk Management -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of James Bentley Sent: Friday, November 07, 2008 12:06 PM To: RBASE-L Mailing List Subject: [RBASE-L] - RE: Calculating a persons age. David, Your solution is functionally incorrect. First, it returns an integer which is not in the YYDDD format. Second, It incorrectly calculates the difference between dates. See other posts for correct calculation. Jim Bentley American Celiac Society [EMAIL PROTECTED] tel: 1-504-737-3293 ----- Original Message ---- From: "Fitts, David A." <[EMAIL PROTECTED]> To: RBASE-L Mailing List <[email protected]> Sent: Friday, November 7, 2008 10:31:01 AM Subject: [RBASE-L] - RE: Calculating a persons age. Can I suggest something like Set v age to ((jdate(.#date))-(jdate(.vbirthday))) This returns the age in YYDDD format so that you know how many years and days old the person is. Regards, Dave Fitts State of Maine Risk Management -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Gray, Damon Sent: Friday, November 07, 2008 10:33 AM To: RBASE-L Mailing List Subject: [RBASE-L] - Calculating a persons age. In the absence of a DATEDIFF function, is there a function in RBase 6.5++ that will allow me to calculate an employee's age from their date of birth and .#DATE, or do I need to code this up? Damon J. Gray Business System Services Anvil Corporation (360) 937-0770

