Get time interval between 2 times

Karthikanbarasan
Posted by Karthikanbarasan under C# category on | Points: 40 | Views : 2483
public string GetInterval(string srtTime, string stpTime)
{
string Interval;
startTime = Convert.ToDateTime(srtTime);
stopTime = Convert.ToDateTime(stpTime);
processTime = stopTime - startTime;
Interval = Convert.ToString(processTime);
return Interval;
}

Comments or Responses

Login to post response