The issue you are facing has to do with the fact that Menidx stores all the dateTime values on UTC time, so if your input is 19-03-2023 and your timezone for example is +5, mendix stores in the database 18:03-2023 19:00:00. This is becasue it caculates back to utc, which is time zone 0.
So in order to validate the correct day from thet database set your check your date using UTC, for example FormatDateTimeUTC.
I would strong recoomend to not disable time zone settings, since Mendix will fall back on your computer's time zone, and does not take into account daylight saving time.
Good luck with it, I hope this will help
You might want to check out the learning path I linked below.
If all your users are within the same timezone, I would turn off localization and use the formatDateTimeUTC function. Only downside is that this does not handle daylight savings. But for your use-case, this isn't necessary.