Column formula to calculate # of days that have passed either from date or today
Hi all- looking for help with this formula. I'm trying to create a formula that will show how many days a patient was/has been in a program, even if they're no longer in a program. Basically, if the patient arrived to the program (Actual Arrival Date) but is still in the program, I'd want to calculate the days that have passed since the patient's arrival (TODAY-Arrival Date), but if the patient was discharged from the program, I want to show how many days the patient was in the program (discharge date minus actual arrival date).
See below for my formula- not sure what I'm getting wrong! Appreciate your advice in advance.
=IF((ISBLANK([Actual Arrival Date]@row), 0,IF((ISBLANK([Discharge Date]@row)),1,2))(TODAY-[Actual Arrival Date]@row),([Discharge Date]@row-[Actual Arrival Date]@row))))
Answers
-
Can you try this?
=IF( [Discharge Date]@row = "", TODAY() - [Actual Arrival Date]@row, TODAY() - [Discharge Date]@row )
It should be like this…
Result
Actual Arrival Date
Discharge Date
213
01/01/24
31
07/01/24
31
01/01/24
07/01/24
...
-
This worked- thank you so much (again)!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.4K Get Help
- 424 Global Discussions
- 221 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 144 Just for fun
- 61 Community Job Board
- 463 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!