Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help With String Time Value - Math
Message
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Help With String Time Value - Math
Environment versions
SQL Server:
SQL Server 2000
Application:
Desktop
Miscellaneous
Thread ID:
01372446
Message ID:
01372446
Views:
59
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.

A hitch in the plan is that if there is not a value in UpTime1 and/or DownTime1 then I want to return a zero.
RecDateTime                        UpTime1         DownTime1
01/09/2009 12:13:00               15:30                15:45
RecDateTime is a datetime value
UpTime1 and DownTime1 are varchr(5)

Thanks for any help.

Kirk
Next
Reply
Map
View

Click here to load this message in the networking platform