How to Perform <= Checks on Dates?

I have to be missing something fundamental… I simply want to check if a date in my database is ‘less-than-or-equal’ to the current date. However, I’m running into the following limitations

I cannot use :rounded down to day for Current date/time.
I don’t have <= or an is operator for dates.

Been stuck on this silly item for > 2 hours (even stumped ChatGPT :wink: and have to believe I am simply not understanding something basic.

How can I check to see if a date is <= the current date?

@nilsobrien

<current date + 1min? :wink:

Remember that a bubble date is just a timestamp that gets rendered differently (as 8:00am for example) depending on what Timezone you’re in (although current date/time is the same for everyone).

Something to keep in mind with searches/constraints

1 Like

Yeah… it’s a bizarre and annoying omission….

You have =, <=, and >= for dates in search constraints and filters…

But not in conditions (no idea why, seems to be an arbitrary design choice by Bubble).

But the easiest, and most accurate way to do it is just to convert the dates to numbers by extracting the Unix timestamps.

i.e.

date1: extract unix <= date2: extract unix

3 Likes

I also find this omission frustrating so I’ve put a request on the Bubble Ideaboard to get it resolved.

2 Likes

Thank you the expert understanding of this speedbump! It was very frustrating to know what needed to be done, to see the platform had the capability, and to only be denied the ability because the UI blocks the capability.