I need your help, I don’t know if it can be done, but I hope it!!
I have a first screen like in this photo:
With, for example, three objects.
I click on the subject “N” and I go in the second screen like this photo:
As you can see, there is a first “PrimoN” label with its calendar, the second “SecondoN” label with its calendar, etc …
I would like to set up an expiration notice:
I choose a date, for example, August 30th, and I would like the word PrimoN to turn red when it is 7 days before August 30th … in this case, when we arrive on August 23rd the word turns red as a warning, before 23rd the word remains green.
I thought of doing a mathematical operation: load the established date into a variable and if, making the subtraction with the current date, it equals 7, it turns red otherwise green.
Problem, the word always remains green, why??
I hope I have explained myself well >__<
This is my code: