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 |
|
pnasz
Posting Yak Master
101 Posts |
Posted - 2012-04-03 : 09:05:08
|
| [timein] [schtimein] [late] 8:00 8:51 00:51 8:00 9:50 01:50Timein and schtimein is datetime format fieldif schtimein is greater then timein then only i want the difference in hh:mm format |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2012-04-03 : 09:08:02
|
use DATEDIFF() to find the time difference KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
pnasz
Posting Yak Master
101 Posts |
Posted - 2012-04-03 : 09:18:59
|
| i want to use it with if condition if schtime is greater then only i want the difference |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2012-04-03 : 09:26:23
|
[code]case when schtime > timeinthen ...else ...end[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|