Full Version: Filter records based on date
UtterAccess Discussion Forums > Microsoft® Access > Access Queries
SuzanneGale
Trying to write a query where I select patients based on a date field. There are 2 dates to be considered, Due Date and Discharge Date. I want to filter only those patients whose Discharge Date was 21 days or earlier than the Due Date. Tried retro-fitting some of the queries in this thread and haven't had much luck. Thanks to anyone who can help!
Doug Steele
The Where clause would look something like:

WHERE DateDiff("d", [Discharge Date], [Due Date]) >= 21
SuzanneGale
That worked perfectly - thank you!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.