Jump to content

Need a *working* script to find a consumer's age


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

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 7776 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
 Share

×
×
  • Create New...

Important Information

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