Search for Date/Time BETWEEN ... AND ...

Results 1 to 2 of 2

Thread: Search for Date/Time BETWEEN ... AND ...

  1. #1
    Join Date
    Dec 1969

    Default Search for Date/Time BETWEEN ... AND ...

    Hi-<BR><BR>I need to be able to do this...<BR> BUT, I need it to be able to support time.<BR><BR>In my DB I have my date and time fileds seperated. In my code it is a lot easier to join the two, then to seperate. But now I need to find all entries that exist between a certain date and time. When I try...<BR><BR>set rs = conn.Execute("SELECT * FROM Users WHERE SDate, STime BETWEEN &#039;" & SDate & " " & STime & "&#039; AND &#039;" & DateAdd("d", 14, SDate) & " " & STime & "&#039; ORDER BY SDate, STime ASC")<BR><BR>It says "Syntax error (comma) in query expression &#039;SDate, STime&#039;".<BR><BR>I would put it through a loop, but then in order for my two alternating color to work, I would need to double the length of my code. It already takes longer then I would like for this page to load.<BR><BR>Any suggestions??<BR><BR>Best,<BR>Jeremy#121

  2. #2
    Join Date
    Dec 1969

    Default Which DBMS? <eop>

    Never forget to tell that.

Posting Permissions

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