dates and between statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to query for a range of dates, i.e. any entry "between 7/1/2004
and 7/31/2004".(user entered by the criteria statement "Between[beginning
date] And [Ending date]) All dates in the database are on a tuesday for each
day of the month, so i have entries for 7/7/2004 ... 7/28/2004 the query
doesn't return the 7/7/2004 entries? Can any shed some lite on this
 
Just guessing, but is the field in which these "dates" are stored a Text
type field? If yes, then the query is not checking dates but rather text
strings.

Assuming that the field has a text type, you'll need a query that uses a
calculated field to convert the text string values into real dates and then
use that field for your criterion:

SELECT * FROM Tablename
WHERE DateValue([YourFieldName])
BETWEEN [beginning date] AND
[Ending date];
 
Back
Top