The 3rd paramter to CONVERT is used only when you convert to a character type, so it won't work in your case.
Instead, you should use DATEDIFF function like this:
Check the DATEDIFF function specs in BOL for more details.Code:SELECT vessel, voyage FROM dneirout WHERE DATEDIFF(month,'20080901',dneirout.CONTAINER_OUT_DATE)>=0




Reply With Quote