Search for data within 10 days
ACCESS:
SELECT * FROM Name WHERE Time Field Between # "& Dateadd (" D ", 1, Date) &" # and # "& Dateadd (" D ", - 10, Date) &" # Order By ID DESC
SQL:
Select * from table where datediff (d, time field, getdate ()) <10
See in detail:
DateDiff function calculates the amount of time between the second date and the first date in the specified date. In other words, it draws the interval between two dates. The result is equal to the band symbol integer value of DATE2 - DATE1, and is based in each date.