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 |
|
sudip_dg77
Starting Member
2 Posts |
Posted - 2007-11-02 : 13:56:22
|
| Hi,I have an user input variable called @stop_time which takes input in the format of HH:MM:SS.I need to convert it into seconds only.declare @start_time datetimeset @start_time ='02:15:00'How can I do that?Can anyone help please? |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2007-11-02 : 14:36:30
|
| You can try thisdeclare @start_time datetimeset @start_time ='02:15:00'SELECT DATEDIFF(s,0,DATEADD(day,0,@start_time))Jim |
 |
|
|
|
|
|