I'm struggling with how to pass datetime parameters into a stored procedure. This is the example I'm working with. I commented out the declaring of the variables, because if I declare them it doesn't let me pass them in when I execute, but if I don't declare them, I can't execute it. Please help!
--The Create Procedure Code
CREATE PROCEDURE users.my_test
AS
--declare @startdatetime datetime = '03-20-2019'
--declare @enddatetime datetime = '05-20-2019'
SELECT datediff(mi,@startdatetime,@enddatetime)
GO
--The execution Code
exec users.my_test
@startdatetime = '03-31-2019', @enddatetime = '07/03/2019'
GO
@