How to create an if statement for any date past a certain date

Hi TB Community,

How would I go about creating something that functions like this: If today is "on or past" a certain date, then certain text will show up within the snippet

And the "certain date" would be a previously gathered date, stored in Datablaze

Thank you ahead of time

Hey @ajduna7 ,

Would something like this works?
I used datetimediff() to check the difference between today() and the selected date. And showing the text based on the condition.

{dbselect: SELECT Name, `Last save` FROM Table1; space=id; menu=yes}
{if: datetimediff(today(), `Last save`, "D") <= 0} Selected old date {endif}

1 Like

This worked great! For the sake of other people's troubleshooting - At first It wasn't working - it said "cannot convert 02/02/2025" to a date, but I realized that I had to change the Datablaze column type from "text" to "date"

Thank you Vinod :slight_smile:

1 Like