Count days based on Status option selected

Hello,

I am not a developer, my background is not technical, but I configure the IBM OpenPages solution for our Business partners, for which the views are based on json. I have become familiar with the language, but with the recent solution upgrade (version 8.2), advanced calculations can be configured. I am afraid that I don’t even know where to start, so my apologies in advance for what may seem like a question with an easy answer.

My Business partner has a Status field that has 4 options (for demonstrative purposes, let’s say Apples, Bananas, Oranges, and Strawberries). Each of the 4 options has a corresponding date field based on the date that option was selected (for demonstrative purposes, let’s say Apples Status Date, Bananas Status Date, Oranges Status Date, and Strawberries Status Date).

I want to write a formula based on the # of days the Status field has been in a particular status. The Status field is single-select, so only one status can be selected at a time.

Anyone know how and where to start?