By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,847 Members | 2,354 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,847 IT Pros & Developers. It's quick & easy.

Date help in Access 2003 query

P: 10
I am running a query in Access 2003 to pull training courses with a start date that falls within a specified date span such 2/1/07 to 2/28/07. I was using this code - (( I.STARTDATE) Between #2/1/2007# And #2/28/2007#) - but found this excluded courses beginning on the first and last date of my date range. I changed the code to this - (( I.STARTDATE) Between #1/31/2007# And #3/1/2007#) and retreived my missing records, but found I was pulling in courses for 1/31/07 (not sure why?). So I tried to add additional criteria such as this - AND (( I.STARTDATE) > #1/31/2007#) AND (( I.STARTDATE) < #3/1/2007#), but I am still getting incorrect data. Can someone help me with the correct code to pull records within a specified date span such as 2/1/07 through 2/28/07. I am sure this is simple, but I am new and self taught, so I need assistance. Thank you.
Mar 28 '07 #1
Share this Question
Share on Google+
1 Reply


P: 10
I am running a query in Access 2003 to pull training courses with a start date that falls within a specified date span such 2/1/07 to 2/28/07. I was using this code - (( I.STARTDATE) Between #2/1/2007# And #2/28/2007#) - but found this excluded courses beginning on the first and last date of my date range. I changed the code to this - (( I.STARTDATE) Between #1/31/2007# And #3/1/2007#) and retreived my missing records, but found I was pulling in courses for 1/31/07 (not sure why?). So I tried to add additional criteria such as this - AND (( I.STARTDATE) > #1/31/2007#) AND (( I.STARTDATE) < #3/1/2007#), but I am still getting incorrect data. Can someone help me with the correct code to pull records within a specified date span such as 2/1/07 through 2/28/07. I am sure this is simple, but I am new and self taught, so I need assistance. Thank you.
As soon as I posted this I realized / figured out that I could >= and <=, so I now seem to have it working.
Mar 28 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.