Incorrect syntax near ‘)’ calling stored procedure with GETDATE

You can’t pass in a function call as an argument to your stored procedure. Instead use an intermediate variable:

DECLARE @tmp DATETIME
SET @tmp = GETDATE()

EXEC DisplayDate @tmp;

Leave a Comment