Automatically clear/reset data

I have an app that contains a dashboard that calculates totals for users. The calculations are daily, monthly and annual. Is there a way that I can reset daily totals to zero at midnight, weekly totals every Saturday at midnight, and annual totals every Dec 31 at midnight? If so, how would would I do that

Hi,
I think the best is to do this on your database. This function depends on the database you use.
Because on Appgyver it will make very complex dates formulas.

You can use the on page mount event to do this.
Basic logic: When the page is shown you check whether the totals need resetting. I would store an expiration date-time value together with the total and keep comparing it to NOW() in a formula.

Can you provide an example of what you mentioned? I’m learning AppGyver but I’m not a developer.
For example, If I wanted to reset the values to zero on the first of each month at midnight how would I do that? I’m not familiar with NOW()