DECLARE @UpTime1 char(5), @DownTime1 char(5) SET @UpTime1 = '15:30' SET @DownTime1 = '15:45' SELECT DATEDIFF( minute, CAST(@UpTime1 AS datetime), CAST(@DownTime1 AS datetime))>I am trying to figure out how to code a stored procedure to return elapsed time values. The date portion is stored in the RecDateTime, the fields UpTime1 and DownTime1 have string values such as 15:30 and 15:45. The goal is turn return an additional column show the difference between UpTime1 and DownTime1, in this case it would be 15 minutes.
>RecDateTime UpTime1 DownTime1 >01/09/2009 12:13:00 15:30 15:45 >>