Setting a deadline in Velo

Hi everyone! I’m trying to set a deadline in my code. The context is: our client needs to have notifications about their back orders (ordes with delay).

In our collection, we receive two dates: the reception date and delivery date, these fields are in date format. I want to our code makes a query and tell us how many orders are with delay.

First of all, thanks for your help.