asp search criteria....help?

Results 1 to 3 of 3

Thread: asp search criteria....help?

  1. #1
    Raquel Anne Guest

    Default asp search criteria....help?

    I have dates formatted like this in a database: 9/9/99<BR>and data in those rows....I want to do a search for all data that the user puts in for a begin date and an end date. My sql looks like this:<BR>sql= "select * from customers where begin date = &#039" & begin & "&#039 and (this is where I am stuck)"<BR><BR>Please help finish the sql to get the desired results.<BR>Thanks in advance!<BR>Raquel Anne

  2. #2
    Join Date
    Dec 1969
    Posts
    177

    Default RE: asp search criteria....help?

    Do you have a seperate field for end date? If so...<BR>sql= "select * from customers where begin date = &#039" & begin & "&#039 and end date = &#039" & end & "&#039"<BR><BR>Or<BR><BR>If you want all data that is between the two dates the user put in...<BR>sql= "select * from customers where begin date &#062;= &#039" & begin & "&#039 and end date &#060;= &#039" & end & "&#039"<BR><BR>Hope this helps.<BR><BR>

  3. #3
    omc Guest

    Default RE: asp search criteria....help?

    try this:<BR><BR>select * from customers where BeginDate between &#039 1/1/95&#039 and<BR>&#039 1/1/99&#039

Posting Permissions

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