Hi,date format's, I love em ;)I have this code..Select ReferralKPI_MainOMSView.dbPatID, ReferralKPI_MainOMSView.dbPatLastName, ReferralKPI_MainOMSView.dbAddDate, ReferralKPI_MainOMSView.LastName, ReferralKPI_MainOMSView.dbStaffLastName From ReferralKPI_MainOMSView Where (ReferralKPI_MainOMSView.dbAddDate <= '2013 Apr') AND (ReferralKPI_MainOMSView.dbStaffLastName IN ('') OR '' = '') AND (ReferralKPI_MainOMSView.LastName IN ('Hameed') OR 'Hameed' = '')
where the date is passed through in that format YYYY MMM ( I think as a string but maybe a datetime type)the dbAddDate is in the typical datetime format yyyy-mm-dd hh:mm:ssand surprisingly it almost works, it brings back all rows who's date is LESS than 2013 Apr BUT not equal to Apr and in fact that's all I want, rows that are EQUAL to, in this case 2013 Apr.I tried just dropping the '<' part of the operator but it doesn't bring back any rows.with my limited sql knowledge I'm stumped.thanks