I know that this has to be relatively simple but I am unfamiliar with FoxPro and the expression builder. I have created a custom report for my deacon family ministry that includes the birthdate and anniversary date for each member. What I want to do is return the actual age of each person. For example, if the person was born on 02/02/1974 the expression would report back 32 (as the person's age). How do I do this? I know it must be a simple mathimatical equation using the functions in Expression Builder, but the answer is alluding me.
Bryon
How do I return the age of someone in a Custom Report?
Moderators: Moderators, Tech Support
-
- Program Development
- Posts: 830
- Joined: Tue Sep 02, 2003 12:48 pm
- Location: PowerChurch Software
- Contact:
You can try this expression:
That takes today's date and subtracts the birthdate. This gives the difference in number of days, so divide by 365 to get # of years. The INT() function gives just the integer portion (ie, you don't get 32.34535624 years old, you get 32).
Hope that helps!
Code: Select all
INT((DATE() - PCPLUS.born)/365)
Hope that helps!