Skip to main content
Question

formula to calculate the number of days a case was open based on the date it was created

  • March 28, 2023
  • 0 replies
  • 141 views

Forum|alt.badge.img+4

I would like help with a formula to calculate and show the number of days a case was open based on the date it was created until the field (case status) is changed to closed. The case status field is Multi-select Text. If that field won't work I'd like it to calculate based on the date it's closed, which is a date field. 

Thank you!!



------------------------------
Nichole Stebane
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24

Try this as a formula numeric field

ToDays([Date Closed] - ToDate([Date Created]))

But you probably want this better one to also show the running days open for unclosed cases.

var date EndDate = IF(IsNull([Date Closed]), Today(), [Date closed]);

ToDays($EndDate - ToDate([Date Created]))

You also have to think if you need to add 1 to the result.  For example if a case was opened on Monday and it's now Tuesday has the case been open 1 day or 2. That's your call based on how your organization thinks.



------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------