I have a stored procedure that for now is just suppose to validate your string input as a valid date. I\'ve tried running this outside of a procedure and it works flawlessly, bu
You need to give an explicit length for the varchar
parameters. It defaults to 1 character.
char(10)
should be enough for valid dates in dd/mm/yyyy
format but I guess you might want longer as this is validating potentially invalid dates!
CREATE PROCEDURE spDateRange
@DateMin varchar(30) = NULL,
@DateMax varchar(30) = NULL
AS