Hi. I need to test if a date is before today. I will count today as starting at midnight.
I found this thread which helps:
But I can’t just subtract 24 hours.
Let’s say the current date/time is 5/7/2025 1:00 PM.
If the test date is 5/7/2025 1:00 AM, then this should count as today.
If the test date is 5/6/2025 11:00 PM, then this should not count as today.
But if I subtract 24 hours as the test, as in the example post, both of these will count as today.
Of course, I thought about using the date, but if I round down to a date and the month changes, then 5/30 should be less than 6/2, but 30 is not less than 2.
Is there some way to round a date to the month/day/year without the time and without losing the reference as a date? All of the solutions I can think of to get the format mm/dd/yyyy are formatting and do not change the actual date.
Thank you.