Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8619 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I've tried different suggestions. They either didn't work or I didn't fully understand the instructions. Given a birthdate, I want to find the consumer's age in years-just years.

Posted

have you tried a calculated field based on a DOB field.

Int((Status(CurrentDate)-DOB)/365)

Int refers to the integer value, or whole number portion of the calculation, DOB being the Date of Birth field in your database.

Hope this helps.

Posted

Here you go:

Create an Auto Enter by Calculation field and use this calculation:

You need a DOB Date Field for this to work.

NumToText(Year(Today) - Year(DOB) - If(Today< Date(Month(DOB), Day(DOB), Year(Today)), 1, 0))

This will give you the correct age in years to the day.

Posted

Use Status(CurrentDate) and Status(CurrentTime) instead of the Today function. Today is only calculated when the application first starts up, so it may be incorrect if the program is running for more than 24 hours.

yeah, it's a bummer... but that's why they made the Status functions.

This topic is 8619 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.