Count Days A Record Has Been in the Same Status

Is this possible? We would like to know the ‘aging’ of our status field. Meaning, how long has a record been sitting in the current status. I’ve included a screenshot (VIEW HERE) of our base pointing to the Status field and the ‘Aging’ field we want to populate with this data. We already have a last modified date but that, as you all know, is for ANY change made to a record. We only want ‘Aging’ to track the Status field. Thank you!

Hi there!

You’ll want to use something like this…

IF(LAST_MODIFIED_TIME(Status), DATETIME_DIFF(TODAY(), LAST_MODIFIED_TIME({Status}), 'days'))

I added the IF() statement because if either of the following things are true…

  1. A record has nothing in the {Status} field
  2. The status was modified before the LAST_MODIFIED_TIME() formula function was introduced

You’ll get a bogus result like “18136” days, which is almost 50 years ago :slight_smile:

1 Like

Thank you so much!! That worked exactly as intended. Appreciate your help!

1 Like

I was wondering if there is a way to only count work days in this formula?

Yes, Airtable has a formula to calculate the number of work days between two dates.

IF( LAST_MODIFIED_TIME(Status), WORKDAY_DIFF( TODAY(), LAST_MODIFIED_TIME({Status}) ) )

By default the WORKDAY_DIFF formula only counts weekdays, but you can also add holidays into the function if desired.

1 Like