Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2002
    Lexington, NC

    Question Unanswered: Problem With Date Query Using ASP

    I am trying to do a dynamic date query on an ASP web page where the user will only enter the date range. I have a page that will query all of the records in the department calendar. There is a button that will allow the user to do a date range query. A form appears at the top of the page when the user clicks the button and they are prompted for the begin and end dates. When the user enters the date and presses enter to query the date range, the query still returns all records. I have even tried to do only a begin date, and all records are still returned. The original query is fine, because it asks for all records greater than today and we are using RECDATE > date as the criteria. When the ASP page is submited, the dates are put into variables and the new query is defined with the new date(s) and is as follows:
    'Select * From Calendar Where MeetDate > 1/20/2003 AND MeetDate < 1/31/2003 ORDER BY MeetDate, BegTime, EndTime'
    This query still returns all records, no matter the date. I have also taken out the AND statement and left just the 'MeetDate > 1/20/2003' and still get all records back. Can you help me????

    Please send correspondence to and Your assistance is greatly appreciated!

    Monty D. Grimmett

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    microsoft access needs date strings enclosed in octothorps

    WHERE MeetDate > #1/20/2003#

    otherwise 1/20/2003 is interpreted as 1 divided by 20 divided 2003


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts