Filtering between two dates!!!!!!!!!!!

jnpeanut

New member
Local time
Today, 09:51
Joined
Dec 8, 2004
Messages
8
I need to write a query that will find all of the dates from 2004. The field is in this format. (01/01/04)

This is what I tried but did not work
where fdd/date > #12/30/03# and fdd/date < #01/01/05#

Not only did this return no data but threw some of the code into the next blank field. (in design view)

Can someone help on this

Thanks
 
What about: Year([MyDateColumn]) = 2004
 
Why not:
WHERE [fdd/date] Between #1/1/2004# And #1/1/2005#

Two points:
1) Days start from midnight. So if you use Dec 31 as the start, you'll include any records from Dec 31
2) I'm nervous about using fdd/date as a field name since it includes both a reserved word and punctuation that make it look like a formula. FddDate would be much better.
 
Between includes both end points. If you want records for a single year, you need to use
WHERE [fdd/date] Between #1/1/2004# And #12/31/2004#

Or

Where Year([ffdd/date]) = [enter year] ' to choose a specific year

or

Where Year([ffdd/date]) = Year(Date()) -1 ' to always choose the previous calendar year
 

Users who are viewing this thread

Back
Top Bottom