How can make to get to display the days reduce the number to 0 and show the last date

this is my blocks and i am trying to get the numbers of day when every day will be reduce and the last is 1 o 0 for use. and too get the max date of app will be work. i am using a guide for the app inventor community but i dont know how to display the max date in the beginning when you open the app.

When the trail or demo button is clicked, add 30 days from the millies and store it in any data base like tinydb (If user clears data then demo period also will be cleared).

When every time screen initialize find the difference between the stored millies and current millies, if the differrence between them goes equal and bellow to 0 it means 30 days over including clicked and last day. (Note here i used tinydb as databse, but it is not advisble one)

1 Like

so my original blocks i need to change all the blocks and use your example?

Yes first test the provided code and if it comes out as per your requirement then apply else need to adjust until you feel you achieved.

Based on this code, it will trigger upon a button click and still the VA be visible till it in trail period when it over it will go into invisible. If you want to display the reducing date then slightly have to adjust

In your code you put yourself manually the expiry but it wont be not possible. It should decide based on the time the button was clicked

its neccesary use a button ?. if i would like to work without push a button?. maybe a notifier? when open the app?

It's not necessary to use a button, you can adapt the code to suit your requirements, but try it out first as-is with the button.