If a date is before another date

Hello! I could use some date help, please. So far the snippet pulls the bound book date (bbd) from Data Blaze, converts it to iso, and saves it under the name bbdiso.
What would the formula be for this statement?
If bbdiso is before June 30, 2024

Aha! Got it. In case anybody else ever needs anything like this:
{if: datetimediff({time: YYYY-MM-DD; at=2024-06-30}, bbdiso, "D") < 0}

If there are other/better ways to do it, though, I'm all ears!

1 Like

That's the right direction. I think we can simplify it further because the date in your case is static, so we don't need to use the time command to format it, like so:

{formdate: YYYY-MM-DD; name=bbdiso}
{if: datetimediff("2024-06-30", bbdiso, "D") <= 0}Before or on{else}After{endif} the given date