Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SEARCHING BETWEEN DATES!

Status
Not open for further replies.

LucyL

Technical User
Feb 20, 2002
113
0
0
US
Hi,
I want to check if one date is BETWEEN two other dates?
I tried using the DateDiff function but this just returns the number of months etc between two dates...
Does anyone know the syntax for searching BETWEEN two dates?

SELECT letting_finish
from Renter
where letting_finish BETWEEN date1 AND date2????
 
Is this a SQL statemenet for an Access database? If so, the code that you wrote should work.
 
Hi,
For sql server , u can try something like this.
SELECT letting_finish
from Renter
where letting_finish BETWEEN (date1,date2).
Goodluck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top