Hi,
I am trying to look up records where a value HolidayDate is in the future but not in the same month:
SELECT *
FROM StaffHolidays
WHERE UserID=124 And HolidayDate>=#10/25/2006# And DatePart('yyyy',HolidayDate)<>DatePart('yyyy',2006/10/25) And DatePart('m',HolidayDate)<>DatePart('m',2006/10/25);
However it is returning a record where HolidayDate is 26/10/2006.
Any ideas why?
Thanks very much
Ed
I am trying to look up records where a value HolidayDate is in the future but not in the same month:
SELECT *
FROM StaffHolidays
WHERE UserID=124 And HolidayDate>=#10/25/2006# And DatePart('yyyy',HolidayDate)<>DatePart('yyyy',2006/10/25) And DatePart('m',HolidayDate)<>DatePart('m',2006/10/25);
However it is returning a record where HolidayDate is 26/10/2006.
Any ideas why?
Thanks very much
Ed