Incorrect Query Date Return

  • Thread starter Thread starter Steve J.
  • Start date Start date
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.
 
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.
 
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.
 
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
 
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.
 
Back
Top