How do I query for orders that were completed between two dates? I am attempting to get orders that were completed between two dates and the "before" and "after" criteria parameters don't seem to work. Perhaps I am using the wrong syntax? Example of how I am using them:

.after('2017-06-02 00:00:00')
It looks like I figured it out by doing this:

.dateOrdered('and', '&gt;=' ~ startDate, '&lt;=' ~ endDate)