maxpouliot
08-03-2006, 02:55 PM
In a table, i have two date fields (startDate, endDate)
I want to make a query that checks if two date that i entered in a form (date1,date2) is between the two dates dates in my table.
date1 = 2006-08-01
date2 = 2006-08-31
I thought something like this would work but it doesnt... can anybidy help me?
SELECT typeFormation, startDate, endDate FROM formations WHERE (date1>=startDate AND date1 <= endDate) OR (date2>=startDate AND date2 <= endDate)
I want to make a query that checks if two date that i entered in a form (date1,date2) is between the two dates dates in my table.
date1 = 2006-08-01
date2 = 2006-08-31
I thought something like this would work but it doesnt... can anybidy help me?
SELECT typeFormation, startDate, endDate FROM formations WHERE (date1>=startDate AND date1 <= endDate) OR (date2>=startDate AND date2 <= endDate)