Ken Sheridan
Member
- Local time
- Today, 22:59
- Joined
- Jul 10, 2025
- Messages
- 57
So if I want to include any results for entire day of August 31st, my AccessSQL should be?
orCode:... WHERE TransactionDate BETWEEN #8/1/2025# AND #8/31/2025#;
Code:... WHERE TransactionDate BETWEEN "2025-08-01 00:00:00" AND "2025-08-31 23:59:59";
In many cases the range will be defined by user entered parameter values, so:
WHERE TransactionDate >= [Enter start date:] AND TransactionDate < [Enter end date:]+1
is better as the user will normally enter the two dates. Generally the parameters will be controls in a form, so you can constrain the values entered to valid dates. Alternatively you can create an auxiliary calendar table, and use a combo boxes for the parameters.