How do I compare the current date/time with the date/time

How do I compare the current date/time with the date/time created in Date/TimePicker? In this case, the Date/TimePicker is saved in the database, and I would like to get this date/time and compare it with the current date/time. Just to make an action of this comparison.

Hi there, @joelson… it would be easier if we knew exactly what you are trying to do, but you will likely need two constraints to compare a saved date to the current date/time. For example, if you wanted to see if the saved date/time is on the current day, the constraints would look like this.

saved date/time >= current date/time:rounded down to date
saved date/time < current date/time +(days): 1:rounded down to date

Hope this helps, but if it doesn’t, share some details (and better yet, screenshots) about what you are trying to accomplish, and I am sure someone can help you get down a good path.


1 Like

Hello dear, as you can see in the photo sequences, I save it with the Date/TimePicker date, so when comparing it with the current date/time it does not make the comparison. If I just compare the time it works but it doesn’t distinguish the day. I’ve done several configurations and nothing so far. The only problem is that I can’t get him to compare the day. As you can see, I want a certain photo to be visible at the saved time and date.