Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Some years ago I took a standard inventory file and have used it since. It is very good. You enter the date purchased and one of the fields calculates the age in years. It is not working and the formula is beyond my expertise. This is the formula;

If(

GetAsText( Year(Get(CurrentDate)) - Year(Date Purchased) ) = "1"; 
GetAsText( Year(Get(CurrentDate)) - Year(Date Purchased) ) & " Year"; 
GetAsText( Year(Get(CurrentDate)) - Year(Date Purchased) )
)
 
I would be grateful if anyone could advise what changes I should make to get the field to work properly. Thanks
Posted

The field that should show age, is not showing anything at all, and for entries made some years ago, it is not giving the correct answer.

Posted

Now that you have that fixed, I suggest you change the formula to a much more simpler =

Year ( Get (CurrentDate) ) - Year ( Date Purchased )

and set the result type of the calculation to Number. Having the units in the same field as the numeric value is not good practice.

 

 

Note that we are assuming here that this is a fiscal calculation (i.e the exact date of the purchase is irrelevant), and that your fiscal year corresponds to the calendar year. IOW, an item purchased on December 31, 2013 is one year old on January 1, 2014.

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