I have problem to find the exact time duration . Like this ---> I have {From time} and {To time} two fields in table in SQL server 2008 database. In this how should i find exact duration of this Time....? ? ?
Table:
--------
From Time To Time Duration
01:05:10 Pm 02:05:10 Pm 01:00:00
Thanks In Advance :)

Iftikar HussainPosted Aug 7, 2013, 5:06 AM
Regards,
Iftikar
suren vPosted Aug 9, 2013, 11:30 PM
Hai dude i found solution....Thanks for your code...it really works Good:)
Iftikar HussainPosted Aug 8, 2013, 2:37 AM
Regards,
Iftikar
suren vPosted Aug 8, 2013, 2:25 AM
It's not working dude....
Thanks for your reply :)
suren vPosted Aug 7, 2013, 4:50 AM
Yes,I'm looking in sql only,.....
Iftikar HussainPosted Aug 7, 2013, 4:20 AM
Are you looking for in SQL?
Regards,
Iftikar
nishant ranjanPosted Aug 7, 2013, 3:42 AM
DateTime startTime =Convert.ToDateTime( "01:05:10 Pm");
DateTime endTime =Convert.ToDateTime( " 02:05:10 Pm");
TimeSpan span = endTime.Subtract(startTime);
Response.Write("Time Difference : " + span);