Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Month query not retrieving all records 1

Status
Not open for further replies.

redbay

Technical User
Oct 13, 2003
145
GB
i have a query set up to show all records within a month.
Between [Start Date] And [End Date]but when i input dates as 01/07/05 to 31/07/05 it leaves out the records for 31/07/05 but if i ask for 01/07/50 to 01/08/05 it shows the records for 01/08/05 and i would just like to see all records for 01 - 31/7/2005
 
Seems you have time info in your DateTime field:
WHERE Int([your Date Field]) Between [Start Date] And [End Date]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Ni time info in date field its set as medium date, have tried to enter as you stated but got the message "The expression you entered contains invalid syntax
 
One trick I often use is to hardcode the times into the between statement. Something like:
Code:
Between [Start Date] & " 00:00" And [End Date] & " 23:59"

Si hoc legere scis, nimis eruditionis habes
 
That works brill, thanks very much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top