Incorrect Query Date Return

S

Steve J.

Hello All. I have a problem with the query returns on a set of dates that I
input.
I have set the dates between 09/01/09 and 09/30/09 and it is returning the
aforementioned dates in addition to September dates from 2008. Would someone
be able to tell me what I am doing wrong. I would really appreciate the
help. Thanks.
 
D

Duane Hookom

I'm not sure why you wouldn't:
1) provide the SQL view of your query
2) provide the data type of your significant fields

Your symptoms suggest your date is being stored as text.
 
D

Dirk Goldgar

Steve J. said:
Hello All. I have a problem with the query returns on a set of dates that
I
input.
I have set the dates between 09/01/09 and 09/30/09 and it is returning the
aforementioned dates in addition to September dates from 2008. Would
someone
be able to tell me what I am doing wrong. I would really appreciate the
help. Thanks.


Please post the SQL view of the query, and the data type (from the table
design view) of the field to which you are applying the criterion.
 
S

Steve J.

1.)

SELECT [Vehicle Investigation_T].[VIO Case Number], [Vehicle
Investigation_T].CurrentVehicleDisposition, [Vehicle
Investigation_T].StatusDateOfDisposition
FROM [Vehicle Investigation_T]
WHERE ((([Vehicle Investigation_T].StatusDateOfDisposition) Between [Date
From] And [Date To]));

2.) Date/Time field
 
S

Steve J.

My sincere thanks for your help. I mistakenly used that field as a "text"
field instead of a "date/time" field. You're good!

Steve J. said:
1.)

SELECT [Vehicle Investigation_T].[VIO Case Number], [Vehicle
Investigation_T].CurrentVehicleDisposition, [Vehicle
Investigation_T].StatusDateOfDisposition
FROM [Vehicle Investigation_T]
WHERE ((([Vehicle Investigation_T].StatusDateOfDisposition) Between [Date
From] And [Date To]));

2.) Date/Time field


Duane Hookom said:
I'm not sure why you wouldn't:
1) provide the SQL view of your query
2) provide the data type of your significant fields

Your symptoms suggest your date is being stored as text.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Date Diff Issue 4
Query By Date and Count Records 3
Summing groups in a report 1
Conditional Sum in a Form 7
Date Function in access 2
Maximum of Two Dates 4
Summing Groups in Reports 2
Crosstab queries 5

Top