Last replied: 19-Apr-12 04:56 AM
 
Hi, this is my code.
DateTime starttime = Convert.ToDateTime(ddlHH.SelectedValue + ":" + ddlMM.SelectedValue + ":00 " + ddlAMPM.SelectedValue); 
DateTime closetime = Convert.ToDateTime(ddlHHClose.SelectedValue + ":" + ddlMMClose.SelectedValue + ":00 " + ddlAMPMClose.SelectedValue);
string Diff =(closetime - starttime).ToString();
Now, i want to convert diff into int or float. Please give me solution.

Hi Mansi

DateTime difference will be in TimeSpan. So, suppose if you want to convert day part to int or float then extract the day part and convert that.

Kamal

Copyrights 2017, www.expertsupdates.com