Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help With String Time Value - Math
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2000
Application:
Desktop
Miscellaneous
Thread ID:
01372446
Message ID:
01372452
Views:
12
This message has been marked as a message which has helped to the initial question of the thread.
The better way would be to use datetime values, so we need to convert both times to 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.
>
>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
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform