I have the following fields in a SQL Database:
@EstimatedRequiredTimeHours DECIMAL(18,2) = NULL,
@ScheduledStartDate SMALLDATETIME = NULL,
@ScheduledEndDate SMALLDATETIME = NULL
I need to calculate the @ScheduledEndDate by adding the @EstimatedRequiredTimeHours to the @ScheduledStartDate.
I’m not entirely sure how to do this, DATEADD() doesn’t seem like exactly what I want and my SQL isn’t too up-to-date.
Any help would be appreciated.
Thanks.
Dateadd accept integers as second parameter, so fractions are truncated, in order to include them, just multiply with 60*60 and add seconds instead.