03-28-2013 12:37 PM
Again, I am trying to calculate a person's age using 6 different numeric inputs.(current day, current month, current year, and Birth day, birth month, birth year). There is one output (age in years). I tried using a select function where if current year>birth year, then subtract to get age in years...this works, but when i try to incorporate the days and months i run into problems. any examples or suggestions on how to attempt this would be appreciated...thanks
03-28-2013 12:48 PM
You can use the data you have to build a time rec cluster and then use the relevant function to convert the cluster to a timestamp. Subtract the older timestamp from the newer one and you will have the age in seconds. Divide that by the number of seconds in a year and you will have your answer. This doesn't take leap years, etc. into account, but since you want the age in years, I assume you don't care too much about accuracy at that level.
03-28-2013 12:53 PM
Please keep in original message thread.