how to calculate the hours
like mrg 10 to 5 total 7 hrs
if i login in 10.30 and logout at 5.30 same 7 hrs me wrokked
now i logi at 10.15 and logout at 5.30 7.45 7hrs and 45 mins me worked i need to calculate the min and hrs
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Khan Abrar AhmedRank #778 · 3K reputationPosted Jun 29, 2014, 10:46 PM EDT
DateTime inTime = Convert.ToDateTime("30/Jun/2014 10.30 AM");
DateTime outtime = Convert.ToDateTime("30/Jun/2014 5.30 PM");
System.TimeSpan diff2 = inTime - outtime;
Akhil MittalRank #133 · 16.9K reputationPosted Jun 29, 2014, 9:43 PM EDT
http://msdn.microsoft.com/en-us/library/8ysw4sby(v=vs.110).aspx