I have created a stored proc
CREATE PROCEDURE [Usp_GetccScholarship] AS
BEGIN
SELECT
scholarship_id
FROM
Scholarship.dbo.Scholarship
WHERE
Datediff("M",
cast(Ltrim(Rtrim(cast(course_month_start as char)))+'/1/'+Ltrim(Rtrim(cast(course_year_start as char))) as datetime),
cast(Ltrim(Rtrim(cast(course_month_end as char)))+'/1/'+Ltrim(Rtrim(cast(course_year_end as char))) as datetime))<='24'
END
GO
when am clicking check syntax it shows syntax is successfull
but when am clicking ok ot shows Error 1023 :invalid parameter 1 specified for datediff
Can anybody help me to solve this problem?