6 Replies Latest reply on Nov 15, 2015 2:18 PM by JammieSchmunk

# Calculation question

I have gone is circles for 2 days. I just need to know how old an item is...

I have a purchase date 2 (Which is the date acquired) and under age I have:

Mod ( Month ( Get ( CurrentDate ) ) - Month ( Purchased Date 2) + 12 - If ( Day ( Get ( CurrentDate ) ) < Day ( Purchased Date 2) ; 1 ; 0 ) ; 12 )

Yet it's not working. What am I doing wrong?

• ###### 1. Re: Calculation question

To determine how many days old the item is, just use:

Get ( CurrentDate ) - Purchased Date 2

Do you need to know more than just the number of days?

• ###### 2. Re: Calculation question

Yes I do. It needs to be in months to help determine depreciation schedule. If you happen to have a script for that, that would be most helpful too.

• ###### 3. Re: Calculation question

Calculation for Elapsed Months | FileMaker

• ###### 4. Re: Calculation question

You could do:

( Get ( CurrentDate ) - Purchase Date 2 ) / 7 to get the number of weeks. You could use Ceiling if you wanted to always round up Floor if you wanted to always round down, or you could round the result.

Some months are longer than others, so are you just using 30 days as an approximation of how long a "month" is?

If so...

( Get ( CurrentDate ) - Purchase Date 2 ) / 30 would give you an approximation of how many [30-day] months old something is.

• ###### 5. Re: Calculation question

What you're doing wrong is not focusing on what you really need.

What does "old" mean ? What is your unit of measure ? Are you happy with an item purchased on march 2 and sold on march 30 returning 0 old ?

• ###### 6. Re: Calculation question

I am looking for lapsed time for depreciation purposes in the measure of months.