Hello,
I have working on asp.net with c#, In I want to create one small module which related attendance and overtime.
Means, One man enter with that datetime and also leave with that datetime,
like Enter Date: 15/12/2014 21:00
Leave Date: 16/12/2014 11:00
so, I want to know, he has worked how many hours ?, with above datetime.
By manually he has worked around 14 Hours. but i want calculate with C#.
Thanks & Regards.
Loading

Guest UserPosted Dec 15, 2014, 4:51 AM
DateTime end = new DateTime(2014, 12, 16, 11, 0, 0);
TimeSpan span = end - start;