Loading

Calculate Case Age in Salesforce Case Object Reports with a Custom Formula Field

Дата публикации: Jul 10, 2026
Описание

In Salesforce Case Object reports, there is no native "Case Age" field. You can calculate case age by creating a Custom Formula Field on the Case object that measures the elapsed time from case creation to the current date, or from creation to the closure date for closed cases. Age can be expressed in days, hours, or minutes depending on your reporting needs.

Решение

Formulas for Elapsed Time from Case Creation to Present

Use the following formulas in a Custom Formula Field with the return type set to Number. These formulas calculate the time elapsed between when the case was created and the current date and time.

  • Case Age in Days: The formula is NOW() minus CreatedDate
  • Case Age in Hours: The formula is (NOW() minus CreatedDate) multiplied by 24
  • Case Age in Minutes: The formula is (NOW() minus CreatedDate) multiplied by 1440

Note: These formulas return the current elapsed time regardless of whether the case is open or closed. For closed cases, use the formula in the next section which accounts for the closure date.

Create a Custom Formula Field for Case Age (Accounting for Closed Cases)

Use the following formulas to return the age at the time of closure for closed cases, and the current elapsed time for open cases:

  • Case Age in Days: IF(IsClosed, ClosedDate minus CreatedDate, NOW() minus CreatedDate)
  • Case Age in Hours: IF(IsClosed, (ClosedDate minus CreatedDate) multiplied by 24, (NOW() minus CreatedDate) multiplied by 24)
  • Case Age in Minutes: IF(IsClosed, (ClosedDate minus CreatedDate) multiplied by 1440, (NOW() minus CreatedDate) multiplied by 1440)

To create the Custom Formula Field:
In Salesforce Lightning Experience:

  1. Navigate to Setup > Object Manager > Case > Fields & Relationships > New.
  2. Select Formula as the data type and click Next.
  3. Enter a Field Label such as "Case Age in Days."
  4. Set the Formula Return Type to Number.
  5. Enter the appropriate formula from above.
  6. Click Next and configure field-level security as needed.
  7. Click Save.

In Salesforce Classic:

  1. Navigate to Setup > Customize > Case > Fields > New.
  2. Select Formula as the data type.
  3. Follow the same steps as above.
Номер статьи базы знаний

000388264

 
Загрузка
Salesforce Help | Article