MSSQL stored procedure help

I am trying to create a stored procedure…only I’m doing it wrong. Can anyone point me in the right direction please.

create procedure pr_get

        @pr_start_date    date,         
        @pr_end_date	date

as

begin

        select * from 
        
        press_release WHERE
        
          press_release_date > @pr_start_date 
          
         AND press_release_date < @pr_end_date

End

I get the following error:

Msg 2715, Level 16, State 3, Procedure pr_get, Line 0
Column or parameter #1: Cannot find data type date.
Parameter ‘@pr_start_date’ has an invalid data type.
Msg 2715, Level 16, State 3, Procedure pr_get, Line 0
Column or parameter #2: Cannot find data type date.
Parameter ‘@pr_end_date’ has an invalid data type.

That fixed it. Thanks

try it with datetime instead of date :slight_smile: