In my cemetery database I'm trying to calculate the approximite age at time of death.
Often, all I have is the year of birth or death, sometimes the month and year, other time nothing is given. Since I can't format to any standard date format with the info given, I'm using the Right function in a query to extract the year of birth and death (if known). Birthyear: Right([Birthdate],4) and DeathYear: Right([DeathDate],4). Then in the query I have a column APOX_AGE: NZ([DeathYear],0)-NZ([BirthYear],0)
I know I can't get an exact age but I do get an approximite age most of the time. The idea is to give me the approximite age at death or something to indicate it is not known. It seems to work OK if all the info is normal and/or given.
I need a way to handle the abnormal and not given events. i.e. If I don't have a date of birth or death, I would like the query to return a question mark (?).
Another problem is if the person was born and died in the same year. In this event I want to return ">1" and rather than 0.
I have not been able to come up with the proper IIF statements to make it work. Maybe there is an easier way.
Thanks for any help you can offer