Click here to Skip to main content
15,902,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello ,

I am trying to retrive records between two dates in access database but it shows blank record..
So how to use between query in access db,

Query :

Select SUM(CashRecv) from QB_BillProcess where CustID=1 and TranDate between 10/01/2013 and 10/07/2013

TranDate is DateTime(MM/dd/yyyy)
Posted

1 solution

DateTime specifications in Access queries have to be enclosed between sharp signs.
SQL
SELECT SUM(CashRecv) FROM QB_BillProcess WHERE CustID=1 and TranDate BETWEEN #10/01/2013# AND #10/07/2013#

This is explicitly stated here:
Criteria for Date/Time fields[^]
 
Share this answer
 
Comments
yogeshkansete 16-Oct-13 6:31am    
Thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900