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 |
|
Jonny1409
Posting Yak Master
133 Posts |
Posted - 2007-09-07 : 04:38:12
|
| Hello,I have 2 fields (StartTime and EndTime).I would like the difference in hours and/or minutes between these 2 fields.So if in StartTime I have 12:30:00and if in EndTime I have 14:00:00I would want to show either 1.5 (Hours) or 90 (Minutes)I assume I need something like datediff, but what would the syntax be please ? |
|
|
mwjdavidson
Aged Yak Warrior
735 Posts |
Posted - 2007-09-07 : 04:40:46
|
| You need something exactly like DATEDIFF. Have a look in BOL for the syntax. It's pretty straightforward.Mark |
 |
|
|
Jonny1409
Posting Yak Master
133 Posts |
Posted - 2007-09-07 : 04:45:06
|
| Ignore this post - I found it.Thanks. |
 |
|
|
|
|
|