Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2003
    Location
    new zealand
    Posts
    17

    Unanswered: need to select date range in sql...not working..

    Hi there, since you guys and gals are so great at sql, and i've learnt so much from you lot and the other forums, that I have one more for you......

    I am trying to query the msaccess database within a time frame (date range)...the msaccess format is dd/mm/yyyy(short), but this code is not working out....i'm NOT GETTING ANY ERROR MESSAGES at all, but just not getting any resultant data....

    SELECT Date_of_Sale, CardRecordID, Sales_Value
    FROM sales
    WHERE Date_of_Sale BETWEEN #varstartDate# and #varendDate#

    this is what i have entered in the variables panel underneath ....

    var = varstartDate, default 01/01/2002, runtime Request.Form("varstartDate")
    var = varendDate, default 01/01/2002, runtime Request.Form("varendDate")


    there are two input textfields in my form called varstartDate and varendDate ...

    Where am I going wrong ??i've been on sqlcourse2.com looking for code samples and answers, but haven't had any luck with this exact scenario.

    Anyone got one of these to work ???
    Thanks again..Angie.

  2. #2
    Join Date
    Feb 2003
    Location
    new zealand
    Posts
    17
    I DID IT...once again, after posting to this forum I try just that little bit harder to suss it out myself, went onto macromedia forums and dreamweaver technotes e.t.c.

    solution: use mm/dd/yyyy and use Request.Form not just 'Request'.

    cheers you lot.
    bye4now

Posting Permissions

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