Here is a sample code to determine age.
 
set var vBirthDate date 
set var vAgeDays integer
set var vAgeYears integer
 
--My Birthday
set var vBirthDate = 11/22/1968
 
--subtract birthdate from todays date
set var VageDays = (.#date - .vBirthdate)
 
--Divide days by years to get age, remove decimal part and put into
vAgeYears
set var vAgeYears = (int(.vAgeDays/365.25))
 
Dan Goldberg

  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Gray, Damon
Sent: Friday, November 07, 2008 7: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

 

Reply via email to