Date help in Access 2003 query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • heckstein
    New Member
    • Sep 2006
    • 10

    Date help in Access 2003 query

    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.
  • heckstein
    New Member
    • Sep 2006
    • 10

    #2
    Originally posted by heckstein
    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.

    Comment

    Working...