Jump to content

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

Recommended Posts

Posted

All of the age calculations I have seen so far (about 10 on this forum) are from "today's date". I want to calculate age based on dates I enter. I do research that enters the date of an event and the person's birthdate and I want to end up with an age at time of the event.

My fields are "DOS" for date of service (actually "DOS Mask" which is defined as a Date Type and "DOB" for Date of Birth, all with 4-digit years.

Also, I am using a Mask (DOS Mask) to make data entry easier (102002 ends up as (10/20/2002") If I format this Mask as a Date, it makes me enter an Auto-Entry calculation which cannot be changed if I change the information. Sometimes during data entry, someone makes a typo like "102003". Well, the mask gets calculated and stays at that display rather than changing when the source window data is changed. I have to enter a whole new record because of this one typo. Is there any way to make this mask calculation updatable?

Posted

All of the age calculations I have seen so far (about 10 on this forum) are from "today's date". I want to calculate age based on dates I enter.

Uhhh... pick your favorite of the 10 and substitute the field (global or otherwise) that holds the entered date everywhere they use "today" or "status(CurrentDate)". What's the problem?

Also, I am using a Mask (DOS Mask) to make data entry easier (102002 ends up as (10/20/2002") If I format this Mask as a Date, it makes me enter an Auto-Entry calculation which cannot be changed if I change the information. Sometimes during data entry, someone makes a typo like "102003". Well, the mask gets calculated and stays at that display rather than changing when the source window data is changed. I have to enter a whole new record because of this one typo. Is there any way to make this mask calculation updatable?

Not sure I followed all that... not sure what the auto-enter calc is for. But I think you should be using two fields... one the entry field that is a Text field with validation set to strictly numeric and add a validation calc that checks the length of the Text input. Then have a second Calculation field with Date value that computes the Date from the Text field. Then you can put the Date Calculation field in your layouts over the top of the Text field such that normally just the formatted Date is displayed. But in Field Format, uncheck "allow entry" so that when the user clicks on it, they get the Text field underneath and they input in that format... when they exit the field it will get instantly formatted.

I don't do that for Dates (I like the normal Date entry behavior), but I do do it for things like Phone Numbers, SSNs, and Credit Cards.

HTH.

This topic is 8134 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.