Hi All,
How to find TimeDifference between TimeIn and TimeOut. I should get 10:30.
How to find TimeDifference between TimeIn and TimeOut. I should get 10:30.
Code:
string frmtimestring = 7:30
string toTimeString = 18:00
decimal frmTime = Convert.ToDecimal(frmtimestring.Replace(":", "."));
decimal totime = Convert.ToDecimal(toTimeString.Replace(":", "."));
if (frmTime > totime)
{
totime = totime + 2400;
}
string TimeDifference = Convert.ToString(frmTime - totime).Replace("-", "");
Comment