emp = moduleEmployee.ReturnEmployeeDAO().FetchEmployeeByID(emp);
DateTime shiftStartTime = emp.Shift.StartTime;
DateTime shiftEndTime = emp.Shift.EndTime;
DateTime attTime = att.Time;
Run Code Online (Sandbox Code Playgroud)
根据上面的代码,我的shiftStartTime是11.00 PM,shiftEndTime是7.00 AM.和attTime或signIntime是凌晨1.00.那么如何计算shiftStartTime和attTime之间的差异.差异应该是2小时.
请帮忙.....
谢谢Rusho