Posted on: 9/28/2015 5:54:20 AM | Views : 965

Hi,
 i have 2 time 10.00 am and 02.00am of next day mid night. It was totally 16 Hrs.
public static String GetTotHrs(String frmHrs, String ToHrs) { DateTime dt1 = Convert.ToDateTime(frmHrs); DateTime dt2 = Convert.ToDateTime(ToHrs); //TimeSpan span = dt2 - dt1; TimeSpan ts = dt2.Subtract(dt1).Duration(); return ts.ToString(); } But it shows only 8 hrs. How to get exact hours of two time with pm and am  

Go to the complete details ...