Most servers use the whole part of the date for several days.
In this example, I use "Now ()" as a server function that returns the current date. You should look right in the documentation for the server you are using.
(also the designation? as the value of the courier identifier)
Select * From orders Where Now() - deliveryDate < 30 And courier_id = ?
If your server does not spend days, you can see its date conversion functions.
source share