Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
JVisconti
Starting Member
47 Posts |
Posted - 2009-10-01 : 13:16:57
|
| I have the following function:UPDATE TicketMetrics SET ResponseTime = CONVERT(varchar(10), HistoryFirstResponse - TicketOpenDateTime /60.0)This should be just a simple subtraction and I just want to make sure I have my synatx correct. Sample Data:TicketOpenDateTime HistoryFirstResponse9/16/2009 9:41:00AM 9/16/2009 9:51:00AMI want the return to be in seconds. |
|
|
rohitkumar
Constraint Violating Yak Guru
472 Posts |
Posted - 2009-10-01 : 13:21:00
|
| check DATEDIFF functionhttp://msdn.microsoft.com/en-us/library/ms189794.aspx |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
JVisconti
Starting Member
47 Posts |
Posted - 2009-10-01 : 13:27:50
|
| Ok I changed the code into the DATEDIFF format, that returns me a whole number in seconds between the two. I need to get that into decimal format. Would it just be /60.0? |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
JVisconti
Starting Member
47 Posts |
Posted - 2009-10-01 : 13:43:01
|
| I knew it was something as simple, brain's not working like it should today. Thanks! |
 |
|
|
|
|
|