• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

MS Database ????????

pea33nut

Member
I need to set up my query so it finds a range of dates. I need all 2004 records. The field that the date is in is in this format 01/01/04. I tried something like this but it doesn't works

where date > 12/30/03 and date < 01/01/05

Can someone help me out
Thank you
 
If it's Access, you'll want:

WHERE date > #12/30/03# AND date < #01/01/05#

If it's SQL Server, use single quotes:

WHERE date > '12/30/03' AND date < '01/01/05'
-or-
WHERE date BETWEEN '01/01/04' AND '12/31/04'
 
That didn't seem to work. I get no data returned and when I check out the query in design view half of the code that I wrote is transfered to the next field (which is empty).

 
Is your column name actually "date"? That could be a problem (date is a keyword and should not be used as a column name).
 
This should also work in Access

WHERE DatePart("yyyy", [DateColumnName]) = 2004

That's assuming the date column is set up as a date data type.
 
Back
Top