As others pointed out, it is difficult to give you a suitable answer, on the basis of the description of the problem so far.
However, I assume you are talking about some records in the database. You could schedule a Timer running daily, checking, if the conditions are met and setting the corresponding values for the DateTime attributes accordingly.
Or if the calculation should happen when saving something in the database, you can run the logic then ;)
Btw in Outsystems 3000-12-31 is the max DateTime value, so you cannot set to anything higher than this. https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Data/Data_Types/Available_Data_Types