Is it possible?

Results 1 to 3 of 3

Thread: Is it possible?

  1. #1
    Join Date
    Dec 1969

    Default Is it possible?

    I am wanting to search between 2 date ranges within 2 columns in a table. The columns are named StartDate and EndDate respectively. How can I search between StartDate and EndDate? Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Is it possible?

    I got this from this message board, I am not sure who ,but it works great!<BR>strSQL = "SELECT * FROM yourTable WHERE (EndDate BETWEEN #"& intFDM &"# AND #"& intLDM &"#"_<BR>&") OR (StartDate BETWEEN #"& intFDM &"# AND #"& intLDM &"#) ORDER BY StartDate"

  3. #3
    Join Date
    Dec 1969

    Default date delimiters

    just to add something to gforty&#039;s post. You do want BETWEEN, but # is only the correct date delimiter for MS Access. SQL Server uses single apostrophe (&#039;). <BR><BR>Not sure about other DBs, though.<BR><BR>

Posting Permissions

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