# Discussions

View Only

## aging based on invoice date

• #### 1.  aging based on invoice date

Posted 03-30-2018 20:26
How do I create a formula that calculates how old an item is based on date (ex. aging based on invoice date or aging based on due date)

Current
1week old
2 weeks (etc)

Current
30 days
60 days (etc)

• #### 2.  RE: aging based on invoice date

Posted 03-30-2018 22:39
If you create a "formula duration" field, you can then add a simple formula to subtract the difference between 2 dates.

If its a Date/Time field, like [Date Created] use:
Now()-[Date Created]

If it is a Date only field, use:
Today()-[Date]

or if you need to convert a Date/Time to just date, use:
Today()-ToDate([Date Created])

By default, formula duration fields use 'smart units'.  But you can change that to weeks or days as desired.

mneil@mcftech.com Phone: 440-201-6050 ext. 476" width="300px">

• #### 3.  RE: aging based on invoice date

Posted 03-31-2018 16:25
Typically its a formula like this.

var number AGE = ToDays([Today()-[Invoice Date]);

IF(
[AGE] < 30, "Current",
[AGE] < 60, "30+",
[AGE] < 90, "60+", "90+")