I'd say the easiest way to do this is using a microflow attribute. That is, an attribute of which the value is computed by a microflow whenever the object is retrieved, rather than being stored in a database. This means that you can easily compute the difference between the date stored in the database and the current date.
One thing to note is that as mentioned above, a microflow attribute is computed every time an object is retrieved, so if an object is retrieved very often or the computation of the microflow variable is quite complex, overusing microflow attributes could have an impact on your performance.
You can find more information on this here: https://world.mendix.com/display/howto25/Set+up+an+attribute+with+microflow+source