Hi, I’m trying to search for database entries using the built-in calendar. Once a date is selected, I wanted to show database entries in a list that match the date (but not the time).
At first this wasn’t working. Then I realized when I set the search criteria to the date selected, it was also searching the time. When the selected date (which defaults to 12:00:00 AM) looks for other entries created on the same date, it’s actually also looking for the same time, even though I set the calendar object to date only. Filtering this way wont return any results because the time of a newly created database entry will never be exactly 12am.
As a workaround, I created a separate column in my database to have my own “created-date.” Now, when creating new database entries, I use the “current date/time” variable as an entry to my own “created-date” column, and setting the seconds, minutes, and hours to zero. Now I have a “created-date” entry with a time of 12am.
When I first started adding new entries, my work-around function was working. Here’s the bug: later at night, the same function, using the “current date/time” as the input actually added tomorrow’s date, while the database’s own created-date entry was still today’s. Now I have two created-date columns with different dates, which breaks my date search function again.
Unless there is a way of searching the database entries based on their created-date while ignoring their time, can this bug be looked at?
thanks