View Full Version : Using DATEDIFF


timmi30
03-11-2005, 09:31 AM
Hi

Is it possible to have a query something like this:

SELECT * FROM availablity WHERE DATEDIFF(day, start_date, enddate) < 7;

I know this statement doesn't work, but i hope it illustrates what i am trying to acheive. I want to select records where the difference between the start and end dates are less than 7 days.

Thanks

timmi30
03-11-2005, 09:36 AM
Hi,

Sorry I got it, just a stupid mistake!

Thanks anyway!