Note that we use the datediff command cause it return date in dd-mm-yyyy 00:00:00.000. If we use only the dateadd command, the result is dd-mm-yyy 15:18:43.852, and this could be a problem if some document (invoice) in recorded in the database at the 01-02-2013 09:15:36.963.

in fact if we run the query after 09:15:36.963 hour, the invoice is not included in the query.