If you just perform appropriate calculations, then consider an alternative: Computed Columns. Convert your stored procedure to function, for example:
create function dbo.CalculateEndTime ( @StartTime datetime )
returns datetime
begin
declare @EndTime as datetime
-- TODO: calculate EndTime
set @EndTime = DATEADD(d, 4, @StartTime)
return @EndTime
end
Then you can define the table in this manner:
create table MyTable
(
id int,
StartTime datetime,
EndTime as dbo.CalculateEndTime(StartTime)
)
After you insert values to id and StartTime and execute select EndTime, … from MyTable, you will get the calculated values.
However, you cannot perform certain operations in this function.
Do you really need a trigger, which appears to be more complex?