May be It will help.
create procedure my_sp_name
@starting_date datetime,
@ending_date datetime
AS
BEGIN
SET NOCOUNT ON;
select ISNULL(SUM (SSI_MAIN_INFORMATION.PI_TOTAL_AMOUNT),0) AS TOTAL_SALES FROM SSI_MAIN_INFORMATION
WHERE PI_DATE >=@starting_date AND
PI_DATE < dateadd(d,1,@ending_date)
PI_DATE <= @ending_date
END
Happy Coding