This seemed so easy, but when it came to doing it, I got stuck lol.
Maybe it is easy, and I’m being dumb.
Anyone know how to prevent the creation of another data entry on a given day. So, for example, you can only create one data entry per given day, and this resets every day.
What I want is the actual date, so just 4/18/2022 12:00 am. Since I want it to reset everyday at midnight. When you do day: you would get 1, when you do date you would get 18
When you round down, you’re able to achieve just that, but I want to round down on both dates (current & other) I’m comparing so if they’re the same then I know we are still on the same day and if it’s not then we’re onto the next date. If that makes sense…
And I’m avoiding Danny’s method because I want it to reset everyday at midnight instead of 24 hours since the last entry was created.
For context: My use case is for attendance. If attendance has been submitted for a given day, then they can still update for that given date, but when it comes the next day, they can take attendance for the next day.
@johnny Just round it down to day when you save the date in the database. Don’t try to round it in the condition. The current date and time will be rounded down to date. Does that make sense?
@ken2 I have used it before to do a running streak as well. Need to check and see if something happened during the day at any time not within the last 24 hours.