The error is in your actual SQL statement. The
DateDiff function requires 3 parameters; and is in the format
DATEDIFF(datepart, startdate, enddate )
Based on the alias you have assigned to the function (Days_Elapse), I am guessing you would want to be using something like this:
SELECT Car_ID
, Cust_ID
, Rental_Due
, DATEDIFF(DD, GETDATE(),Rental_Due) as Days_Elapse
FROM CarRental
WHERE Car_ID =?
Reference:
DATEDIFF (Transact-SQL) - SQL Server | Microsoft Docs[
^]