Date range in query

G

Guest

Hi All. I am trying to design a query for a quarterly report.
This is the syntax I have used.
("datereceived">=#01/01/2005# And "datereceived"<=#04/01/2005#)

I dont get any results at all! The column name is Date Received and I have
change datatype to Date/Time. I want all records for the first quarter to
appear, how would I do this?

Thanks for any help
 
D

Duane Hookom

Try
WHERE [datereceived]>=#01/01/2005# And [datereceived]<=#04/01/2005#
or
WHERE [datereceived] Between #01/01/2005# And #04/01/2005#

If you are describing only what you see in the criteria in the query design
view, use
Between #01/01/2005# And #04/01/2005#
 
G

Guest

Try this, Adding [] for the fields

([datereceived]>=#01/01/2005# And [datereceived]<=#04/01/2005#)
 
G

Guest

Hi there

This worked in the end! Just the plain and simple version! Go figure. Thanks
guys!

Between #01/04/2005# And #16/06/2005#
Ofer said:
Try this, Adding [] for the fields

([datereceived]>=#01/01/2005# And [datereceived]<=#04/01/2005#)


mix said:
Hi All. I am trying to design a query for a quarterly report.
This is the syntax I have used.
("datereceived">=#01/01/2005# And "datereceived"<=#04/01/2005#)

I dont get any results at all! The column name is Date Received and I have
change datatype to Date/Time. I want all records for the first quarter to
appear, how would I do this?

Thanks for any help
 

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

Top